@data-fair/lib-common-types 1.10.3 → 1.10.4

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": "@data-fair/lib-common-types",
3
- "version": "1.10.3",
3
+ "version": "1.10.4",
4
4
  "description": "Shared schemas and built type definitions in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -45,6 +45,7 @@ export type OrganizationMembership = {
45
45
  id: string;
46
46
  name: string;
47
47
  role: string;
48
+ roleLabel?: string;
48
49
  department?: string;
49
50
  departmentName?: string;
50
51
  dflt?: 1;
@@ -5,8 +5,8 @@ import { fullFormats } from "ajv-formats/dist/formats.js";
5
5
  "use strict";
6
6
  export const validate = validate14;
7
7
  export default validate14;
8
- const schema16 = {"$id":"https://github.com/data-fair/lib/session-state","x-exports":["types","validate"],"type":"object","title":"session state","additionalProperties":false,"required":["lang"],"properties":{"user":{"$ref":"#/$defs/user"},"organization":{"$ref":"#/$defs/organizationMembership"},"account":{"$ref":"#/$defs/account"},"accountRole":{"type":"string"},"siteRole":{"type":"string"},"lang":{"type":"string"},"dark":{"deprecated":true,"type":"boolean"}},"$defs":{"organizationMembership":{"type":"object","additionalProperties":false,"required":["id","name","role"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"},"dflt":{"type":"integer","enum":[1]}}},"userRef":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"user":{"type":"object","additionalProperties":false,"required":["email","id","name","organizations"],"properties":{"email":{"type":"string","format":"email"},"id":{"type":"string"},"name":{"type":"string"},"organizations":{"type":"array","items":{"$ref":"#/$defs/organizationMembership"}},"isAdmin":{"type":"integer","enum":[1]},"adminMode":{"type":"integer","enum":[1]},"asAdmin":{"$ref":"#/$defs/userRef"},"pd":{"type":"string","format":"date"},"ipa":{"type":"integer","title":"short for ignorePersonalAccount","enum":[1]},"idp":{"type":"integer","title":"Is the user coming from a core ID provider ?","enum":[1]},"os":{"type":"integer","title":"short for orgStorage","enum":[1]},"rememberMe":{"type":"integer","enum":[1]},"siteOwner":{"$ref":"#/$defs/account"}}},"account":{"type":"object","additionalProperties":false,"required":["type","id","name"],"properties":{"type":{"type":"string","enum":["user","organization"]},"id":{"type":"string"},"name":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"}}}}};
9
- const schema18 = {"type":"object","additionalProperties":false,"required":["id","name","role"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"},"dflt":{"type":"integer","enum":[1]}}};
8
+ const schema16 = {"$id":"https://github.com/data-fair/lib/session-state","x-exports":["types","validate"],"type":"object","title":"session state","additionalProperties":false,"required":["lang"],"properties":{"user":{"$ref":"#/$defs/user"},"organization":{"$ref":"#/$defs/organizationMembership"},"account":{"$ref":"#/$defs/account"},"accountRole":{"type":"string"},"siteRole":{"type":"string"},"lang":{"type":"string"},"dark":{"deprecated":true,"type":"boolean"}},"$defs":{"organizationMembership":{"type":"object","additionalProperties":false,"required":["id","name","role"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"roleLabel":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"},"dflt":{"type":"integer","enum":[1]}}},"userRef":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"user":{"type":"object","additionalProperties":false,"required":["email","id","name","organizations"],"properties":{"email":{"type":"string","format":"email"},"id":{"type":"string"},"name":{"type":"string"},"organizations":{"type":"array","items":{"$ref":"#/$defs/organizationMembership"}},"isAdmin":{"type":"integer","enum":[1]},"adminMode":{"type":"integer","enum":[1]},"asAdmin":{"$ref":"#/$defs/userRef"},"pd":{"type":"string","format":"date"},"ipa":{"type":"integer","title":"short for ignorePersonalAccount","enum":[1]},"idp":{"type":"integer","title":"Is the user coming from a core ID provider ?","enum":[1]},"os":{"type":"integer","title":"short for orgStorage","enum":[1]},"rememberMe":{"type":"integer","enum":[1]},"siteOwner":{"$ref":"#/$defs/account"}}},"account":{"type":"object","additionalProperties":false,"required":["type","id","name"],"properties":{"type":{"type":"string","enum":["user","organization"]},"id":{"type":"string"},"name":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"}}}}};
9
+ const schema18 = {"type":"object","additionalProperties":false,"required":["id","name","role"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"roleLabel":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"},"dflt":{"type":"integer","enum":[1]}}};
10
10
  const schema20 = {"type":"object","additionalProperties":false,"required":["type","id","name"],"properties":{"type":{"type":"string","enum":["user","organization"]},"id":{"type":"string"},"name":{"type":"string"},"department":{"type":"string"},"departmentName":{"type":"string"}}};
11
11
  const schema17 = {"type":"object","additionalProperties":false,"required":["email","id","name","organizations"],"properties":{"email":{"type":"string","format":"email"},"id":{"type":"string"},"name":{"type":"string"},"organizations":{"type":"array","items":{"$ref":"#/$defs/organizationMembership"}},"isAdmin":{"type":"integer","enum":[1]},"adminMode":{"type":"integer","enum":[1]},"asAdmin":{"$ref":"#/$defs/userRef"},"pd":{"type":"string","format":"date"},"ipa":{"type":"integer","title":"short for ignorePersonalAccount","enum":[1]},"idp":{"type":"integer","title":"Is the user coming from a core ID provider ?","enum":[1]},"os":{"type":"integer","title":"short for orgStorage","enum":[1]},"rememberMe":{"type":"integer","enum":[1]},"siteOwner":{"$ref":"#/$defs/account"}}};
12
12
  const schema19 = {"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}};
@@ -157,7 +157,7 @@ vErrors.push(err11);
157
157
  errors++;
158
158
  }
159
159
  for(const key1 in data4){
160
- if(!((((((key1 === "id") || (key1 === "name")) || (key1 === "role")) || (key1 === "department")) || (key1 === "departmentName")) || (key1 === "dflt"))){
160
+ if(!(((((((key1 === "id") || (key1 === "name")) || (key1 === "role")) || (key1 === "roleLabel")) || (key1 === "department")) || (key1 === "departmentName")) || (key1 === "dflt"))){
161
161
  const err12 = {instancePath:instancePath+"/organizations/" + i0,schemaPath:"#/$defs/organizationMembership/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
162
162
  if(vErrors === null){
163
163
  vErrors = [err12];
@@ -204,9 +204,9 @@ vErrors.push(err15);
204
204
  errors++;
205
205
  }
206
206
  }
207
- if(data4.department !== undefined){
208
- if(typeof data4.department !== "string"){
209
- const err16 = {instancePath:instancePath+"/organizations/" + i0+"/department",schemaPath:"#/$defs/organizationMembership/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
207
+ if(data4.roleLabel !== undefined){
208
+ if(typeof data4.roleLabel !== "string"){
209
+ const err16 = {instancePath:instancePath+"/organizations/" + i0+"/roleLabel",schemaPath:"#/$defs/organizationMembership/properties/roleLabel/type",keyword:"type",params:{type: "string"},message:"must be string"};
210
210
  if(vErrors === null){
211
211
  vErrors = [err16];
212
212
  }
@@ -216,9 +216,9 @@ vErrors.push(err16);
216
216
  errors++;
217
217
  }
218
218
  }
219
- if(data4.departmentName !== undefined){
220
- if(typeof data4.departmentName !== "string"){
221
- const err17 = {instancePath:instancePath+"/organizations/" + i0+"/departmentName",schemaPath:"#/$defs/organizationMembership/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
219
+ if(data4.department !== undefined){
220
+ if(typeof data4.department !== "string"){
221
+ const err17 = {instancePath:instancePath+"/organizations/" + i0+"/department",schemaPath:"#/$defs/organizationMembership/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
222
222
  if(vErrors === null){
223
223
  vErrors = [err17];
224
224
  }
@@ -228,10 +228,9 @@ vErrors.push(err17);
228
228
  errors++;
229
229
  }
230
230
  }
231
- if(data4.dflt !== undefined){
232
- let data10 = data4.dflt;
233
- if(!((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10)))){
234
- const err18 = {instancePath:instancePath+"/organizations/" + i0+"/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
231
+ if(data4.departmentName !== undefined){
232
+ if(typeof data4.departmentName !== "string"){
233
+ const err18 = {instancePath:instancePath+"/organizations/" + i0+"/departmentName",schemaPath:"#/$defs/organizationMembership/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
235
234
  if(vErrors === null){
236
235
  vErrors = [err18];
237
236
  }
@@ -240,8 +239,11 @@ vErrors.push(err18);
240
239
  }
241
240
  errors++;
242
241
  }
243
- if(!(data10 === 1)){
244
- const err19 = {instancePath:instancePath+"/organizations/" + i0+"/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/enum",keyword:"enum",params:{allowedValues: schema18.properties.dflt.enum},message:"must be equal to one of the allowed values"};
242
+ }
243
+ if(data4.dflt !== undefined){
244
+ let data11 = data4.dflt;
245
+ if(!((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11)))){
246
+ const err19 = {instancePath:instancePath+"/organizations/" + i0+"/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
245
247
  if(vErrors === null){
246
248
  vErrors = [err19];
247
249
  }
@@ -250,10 +252,8 @@ vErrors.push(err19);
250
252
  }
251
253
  errors++;
252
254
  }
253
- }
254
- }
255
- else {
256
- const err20 = {instancePath:instancePath+"/organizations/" + i0,schemaPath:"#/$defs/organizationMembership/type",keyword:"type",params:{type: "object"},message:"must be object"};
255
+ if(!(data11 === 1)){
256
+ const err20 = {instancePath:instancePath+"/organizations/" + i0+"/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/enum",keyword:"enum",params:{allowedValues: schema18.properties.dflt.enum},message:"must be equal to one of the allowed values"};
257
257
  if(vErrors === null){
258
258
  vErrors = [err20];
259
259
  }
@@ -265,7 +265,7 @@ errors++;
265
265
  }
266
266
  }
267
267
  else {
268
- const err21 = {instancePath:instancePath+"/organizations",schemaPath:"#/properties/organizations/type",keyword:"type",params:{type: "array"},message:"must be array"};
268
+ const err21 = {instancePath:instancePath+"/organizations/" + i0,schemaPath:"#/$defs/organizationMembership/type",keyword:"type",params:{type: "object"},message:"must be object"};
269
269
  if(vErrors === null){
270
270
  vErrors = [err21];
271
271
  }
@@ -275,10 +275,9 @@ vErrors.push(err21);
275
275
  errors++;
276
276
  }
277
277
  }
278
- if(data.isAdmin !== undefined){
279
- let data11 = data.isAdmin;
280
- if(!((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11)))){
281
- const err22 = {instancePath:instancePath+"/isAdmin",schemaPath:"#/properties/isAdmin/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
278
+ }
279
+ else {
280
+ const err22 = {instancePath:instancePath+"/organizations",schemaPath:"#/properties/organizations/type",keyword:"type",params:{type: "array"},message:"must be array"};
282
281
  if(vErrors === null){
283
282
  vErrors = [err22];
284
283
  }
@@ -287,8 +286,11 @@ vErrors.push(err22);
287
286
  }
288
287
  errors++;
289
288
  }
290
- if(!(data11 === 1)){
291
- const err23 = {instancePath:instancePath+"/isAdmin",schemaPath:"#/properties/isAdmin/enum",keyword:"enum",params:{allowedValues: schema17.properties.isAdmin.enum},message:"must be equal to one of the allowed values"};
289
+ }
290
+ if(data.isAdmin !== undefined){
291
+ let data12 = data.isAdmin;
292
+ if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){
293
+ const err23 = {instancePath:instancePath+"/isAdmin",schemaPath:"#/properties/isAdmin/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
292
294
  if(vErrors === null){
293
295
  vErrors = [err23];
294
296
  }
@@ -297,11 +299,8 @@ vErrors.push(err23);
297
299
  }
298
300
  errors++;
299
301
  }
300
- }
301
- if(data.adminMode !== undefined){
302
- let data12 = data.adminMode;
303
- if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){
304
- const err24 = {instancePath:instancePath+"/adminMode",schemaPath:"#/properties/adminMode/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
302
+ if(!(data12 === 1)){
303
+ const err24 = {instancePath:instancePath+"/isAdmin",schemaPath:"#/properties/isAdmin/enum",keyword:"enum",params:{allowedValues: schema17.properties.isAdmin.enum},message:"must be equal to one of the allowed values"};
305
304
  if(vErrors === null){
306
305
  vErrors = [err24];
307
306
  }
@@ -310,8 +309,11 @@ vErrors.push(err24);
310
309
  }
311
310
  errors++;
312
311
  }
313
- if(!(data12 === 1)){
314
- const err25 = {instancePath:instancePath+"/adminMode",schemaPath:"#/properties/adminMode/enum",keyword:"enum",params:{allowedValues: schema17.properties.adminMode.enum},message:"must be equal to one of the allowed values"};
312
+ }
313
+ if(data.adminMode !== undefined){
314
+ let data13 = data.adminMode;
315
+ if(!((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13)))){
316
+ const err25 = {instancePath:instancePath+"/adminMode",schemaPath:"#/properties/adminMode/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
315
317
  if(vErrors === null){
316
318
  vErrors = [err25];
317
319
  }
@@ -320,12 +322,8 @@ vErrors.push(err25);
320
322
  }
321
323
  errors++;
322
324
  }
323
- }
324
- if(data.asAdmin !== undefined){
325
- let data13 = data.asAdmin;
326
- if(data13 && typeof data13 == "object" && !Array.isArray(data13)){
327
- if(data13.id === undefined){
328
- const err26 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
325
+ if(!(data13 === 1)){
326
+ const err26 = {instancePath:instancePath+"/adminMode",schemaPath:"#/properties/adminMode/enum",keyword:"enum",params:{allowedValues: schema17.properties.adminMode.enum},message:"must be equal to one of the allowed values"};
329
327
  if(vErrors === null){
330
328
  vErrors = [err26];
331
329
  }
@@ -334,8 +332,12 @@ vErrors.push(err26);
334
332
  }
335
333
  errors++;
336
334
  }
337
- if(data13.name === undefined){
338
- const err27 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};
335
+ }
336
+ if(data.asAdmin !== undefined){
337
+ let data14 = data.asAdmin;
338
+ if(data14 && typeof data14 == "object" && !Array.isArray(data14)){
339
+ if(data14.id === undefined){
340
+ const err27 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
339
341
  if(vErrors === null){
340
342
  vErrors = [err27];
341
343
  }
@@ -344,9 +346,8 @@ vErrors.push(err27);
344
346
  }
345
347
  errors++;
346
348
  }
347
- for(const key2 in data13){
348
- if(!((key2 === "id") || (key2 === "name"))){
349
- const err28 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
349
+ if(data14.name === undefined){
350
+ const err28 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};
350
351
  if(vErrors === null){
351
352
  vErrors = [err28];
352
353
  }
@@ -355,10 +356,9 @@ vErrors.push(err28);
355
356
  }
356
357
  errors++;
357
358
  }
358
- }
359
- if(data13.id !== undefined){
360
- if(typeof data13.id !== "string"){
361
- const err29 = {instancePath:instancePath+"/asAdmin/id",schemaPath:"#/$defs/userRef/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
359
+ for(const key2 in data14){
360
+ if(!((key2 === "id") || (key2 === "name"))){
361
+ const err29 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
362
362
  if(vErrors === null){
363
363
  vErrors = [err29];
364
364
  }
@@ -368,9 +368,9 @@ vErrors.push(err29);
368
368
  errors++;
369
369
  }
370
370
  }
371
- if(data13.name !== undefined){
372
- if(typeof data13.name !== "string"){
373
- const err30 = {instancePath:instancePath+"/asAdmin/name",schemaPath:"#/$defs/userRef/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
371
+ if(data14.id !== undefined){
372
+ if(typeof data14.id !== "string"){
373
+ const err30 = {instancePath:instancePath+"/asAdmin/id",schemaPath:"#/$defs/userRef/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
374
374
  if(vErrors === null){
375
375
  vErrors = [err30];
376
376
  }
@@ -380,9 +380,9 @@ vErrors.push(err30);
380
380
  errors++;
381
381
  }
382
382
  }
383
- }
384
- else {
385
- const err31 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/type",keyword:"type",params:{type: "object"},message:"must be object"};
383
+ if(data14.name !== undefined){
384
+ if(typeof data14.name !== "string"){
385
+ const err31 = {instancePath:instancePath+"/asAdmin/name",schemaPath:"#/$defs/userRef/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
386
386
  if(vErrors === null){
387
387
  vErrors = [err31];
388
388
  }
@@ -392,11 +392,9 @@ vErrors.push(err31);
392
392
  errors++;
393
393
  }
394
394
  }
395
- if(data.pd !== undefined){
396
- let data16 = data.pd;
397
- if(typeof data16 === "string"){
398
- if(!(formats2.validate(data16))){
399
- const err32 = {instancePath:instancePath+"/pd",schemaPath:"#/properties/pd/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\""};
395
+ }
396
+ else {
397
+ const err32 = {instancePath:instancePath+"/asAdmin",schemaPath:"#/$defs/userRef/type",keyword:"type",params:{type: "object"},message:"must be object"};
400
398
  if(vErrors === null){
401
399
  vErrors = [err32];
402
400
  }
@@ -406,8 +404,11 @@ vErrors.push(err32);
406
404
  errors++;
407
405
  }
408
406
  }
409
- else {
410
- const err33 = {instancePath:instancePath+"/pd",schemaPath:"#/properties/pd/type",keyword:"type",params:{type: "string"},message:"must be string"};
407
+ if(data.pd !== undefined){
408
+ let data17 = data.pd;
409
+ if(typeof data17 === "string"){
410
+ if(!(formats2.validate(data17))){
411
+ const err33 = {instancePath:instancePath+"/pd",schemaPath:"#/properties/pd/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\""};
411
412
  if(vErrors === null){
412
413
  vErrors = [err33];
413
414
  }
@@ -417,10 +418,8 @@ vErrors.push(err33);
417
418
  errors++;
418
419
  }
419
420
  }
420
- if(data.ipa !== undefined){
421
- let data17 = data.ipa;
422
- if(!((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17)))){
423
- const err34 = {instancePath:instancePath+"/ipa",schemaPath:"#/properties/ipa/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
421
+ else {
422
+ const err34 = {instancePath:instancePath+"/pd",schemaPath:"#/properties/pd/type",keyword:"type",params:{type: "string"},message:"must be string"};
424
423
  if(vErrors === null){
425
424
  vErrors = [err34];
426
425
  }
@@ -429,8 +428,11 @@ vErrors.push(err34);
429
428
  }
430
429
  errors++;
431
430
  }
432
- if(!(data17 === 1)){
433
- const err35 = {instancePath:instancePath+"/ipa",schemaPath:"#/properties/ipa/enum",keyword:"enum",params:{allowedValues: schema17.properties.ipa.enum},message:"must be equal to one of the allowed values"};
431
+ }
432
+ if(data.ipa !== undefined){
433
+ let data18 = data.ipa;
434
+ if(!((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18)))){
435
+ const err35 = {instancePath:instancePath+"/ipa",schemaPath:"#/properties/ipa/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
434
436
  if(vErrors === null){
435
437
  vErrors = [err35];
436
438
  }
@@ -439,11 +441,8 @@ vErrors.push(err35);
439
441
  }
440
442
  errors++;
441
443
  }
442
- }
443
- if(data.idp !== undefined){
444
- let data18 = data.idp;
445
- if(!((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18)))){
446
- const err36 = {instancePath:instancePath+"/idp",schemaPath:"#/properties/idp/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
444
+ if(!(data18 === 1)){
445
+ const err36 = {instancePath:instancePath+"/ipa",schemaPath:"#/properties/ipa/enum",keyword:"enum",params:{allowedValues: schema17.properties.ipa.enum},message:"must be equal to one of the allowed values"};
447
446
  if(vErrors === null){
448
447
  vErrors = [err36];
449
448
  }
@@ -452,8 +451,11 @@ vErrors.push(err36);
452
451
  }
453
452
  errors++;
454
453
  }
455
- if(!(data18 === 1)){
456
- const err37 = {instancePath:instancePath+"/idp",schemaPath:"#/properties/idp/enum",keyword:"enum",params:{allowedValues: schema17.properties.idp.enum},message:"must be equal to one of the allowed values"};
454
+ }
455
+ if(data.idp !== undefined){
456
+ let data19 = data.idp;
457
+ if(!((typeof data19 == "number") && (!(data19 % 1) && !isNaN(data19)))){
458
+ const err37 = {instancePath:instancePath+"/idp",schemaPath:"#/properties/idp/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
457
459
  if(vErrors === null){
458
460
  vErrors = [err37];
459
461
  }
@@ -462,11 +464,8 @@ vErrors.push(err37);
462
464
  }
463
465
  errors++;
464
466
  }
465
- }
466
- if(data.os !== undefined){
467
- let data19 = data.os;
468
- if(!((typeof data19 == "number") && (!(data19 % 1) && !isNaN(data19)))){
469
- const err38 = {instancePath:instancePath+"/os",schemaPath:"#/properties/os/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
467
+ if(!(data19 === 1)){
468
+ const err38 = {instancePath:instancePath+"/idp",schemaPath:"#/properties/idp/enum",keyword:"enum",params:{allowedValues: schema17.properties.idp.enum},message:"must be equal to one of the allowed values"};
470
469
  if(vErrors === null){
471
470
  vErrors = [err38];
472
471
  }
@@ -475,8 +474,11 @@ vErrors.push(err38);
475
474
  }
476
475
  errors++;
477
476
  }
478
- if(!(data19 === 1)){
479
- const err39 = {instancePath:instancePath+"/os",schemaPath:"#/properties/os/enum",keyword:"enum",params:{allowedValues: schema17.properties.os.enum},message:"must be equal to one of the allowed values"};
477
+ }
478
+ if(data.os !== undefined){
479
+ let data20 = data.os;
480
+ if(!((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20)))){
481
+ const err39 = {instancePath:instancePath+"/os",schemaPath:"#/properties/os/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
480
482
  if(vErrors === null){
481
483
  vErrors = [err39];
482
484
  }
@@ -485,11 +487,8 @@ vErrors.push(err39);
485
487
  }
486
488
  errors++;
487
489
  }
488
- }
489
- if(data.rememberMe !== undefined){
490
- let data20 = data.rememberMe;
491
- if(!((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20)))){
492
- const err40 = {instancePath:instancePath+"/rememberMe",schemaPath:"#/properties/rememberMe/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
490
+ if(!(data20 === 1)){
491
+ const err40 = {instancePath:instancePath+"/os",schemaPath:"#/properties/os/enum",keyword:"enum",params:{allowedValues: schema17.properties.os.enum},message:"must be equal to one of the allowed values"};
493
492
  if(vErrors === null){
494
493
  vErrors = [err40];
495
494
  }
@@ -498,8 +497,11 @@ vErrors.push(err40);
498
497
  }
499
498
  errors++;
500
499
  }
501
- if(!(data20 === 1)){
502
- const err41 = {instancePath:instancePath+"/rememberMe",schemaPath:"#/properties/rememberMe/enum",keyword:"enum",params:{allowedValues: schema17.properties.rememberMe.enum},message:"must be equal to one of the allowed values"};
500
+ }
501
+ if(data.rememberMe !== undefined){
502
+ let data21 = data.rememberMe;
503
+ if(!((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21)))){
504
+ const err41 = {instancePath:instancePath+"/rememberMe",schemaPath:"#/properties/rememberMe/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
503
505
  if(vErrors === null){
504
506
  vErrors = [err41];
505
507
  }
@@ -508,12 +510,8 @@ vErrors.push(err41);
508
510
  }
509
511
  errors++;
510
512
  }
511
- }
512
- if(data.siteOwner !== undefined){
513
- let data21 = data.siteOwner;
514
- if(data21 && typeof data21 == "object" && !Array.isArray(data21)){
515
- if(data21.type === undefined){
516
- const err42 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};
513
+ if(!(data21 === 1)){
514
+ const err42 = {instancePath:instancePath+"/rememberMe",schemaPath:"#/properties/rememberMe/enum",keyword:"enum",params:{allowedValues: schema17.properties.rememberMe.enum},message:"must be equal to one of the allowed values"};
517
515
  if(vErrors === null){
518
516
  vErrors = [err42];
519
517
  }
@@ -522,8 +520,12 @@ vErrors.push(err42);
522
520
  }
523
521
  errors++;
524
522
  }
525
- if(data21.id === undefined){
526
- const err43 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
523
+ }
524
+ if(data.siteOwner !== undefined){
525
+ let data22 = data.siteOwner;
526
+ if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
527
+ if(data22.type === undefined){
528
+ const err43 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};
527
529
  if(vErrors === null){
528
530
  vErrors = [err43];
529
531
  }
@@ -532,8 +534,8 @@ vErrors.push(err43);
532
534
  }
533
535
  errors++;
534
536
  }
535
- if(data21.name === undefined){
536
- const err44 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};
537
+ if(data22.id === undefined){
538
+ const err44 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
537
539
  if(vErrors === null){
538
540
  vErrors = [err44];
539
541
  }
@@ -542,9 +544,8 @@ vErrors.push(err44);
542
544
  }
543
545
  errors++;
544
546
  }
545
- for(const key3 in data21){
546
- if(!(((((key3 === "type") || (key3 === "id")) || (key3 === "name")) || (key3 === "department")) || (key3 === "departmentName"))){
547
- const err45 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
547
+ if(data22.name === undefined){
548
+ const err45 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};
548
549
  if(vErrors === null){
549
550
  vErrors = [err45];
550
551
  }
@@ -553,11 +554,9 @@ vErrors.push(err45);
553
554
  }
554
555
  errors++;
555
556
  }
556
- }
557
- if(data21.type !== undefined){
558
- let data22 = data21.type;
559
- if(typeof data22 !== "string"){
560
- const err46 = {instancePath:instancePath+"/siteOwner/type",schemaPath:"#/$defs/account/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};
557
+ for(const key3 in data22){
558
+ if(!(((((key3 === "type") || (key3 === "id")) || (key3 === "name")) || (key3 === "department")) || (key3 === "departmentName"))){
559
+ const err46 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
561
560
  if(vErrors === null){
562
561
  vErrors = [err46];
563
562
  }
@@ -566,8 +565,11 @@ vErrors.push(err46);
566
565
  }
567
566
  errors++;
568
567
  }
569
- if(!((data22 === "user") || (data22 === "organization"))){
570
- const err47 = {instancePath:instancePath+"/siteOwner/type",schemaPath:"#/$defs/account/properties/type/enum",keyword:"enum",params:{allowedValues: schema20.properties.type.enum},message:"must be equal to one of the allowed values"};
568
+ }
569
+ if(data22.type !== undefined){
570
+ let data23 = data22.type;
571
+ if(typeof data23 !== "string"){
572
+ const err47 = {instancePath:instancePath+"/siteOwner/type",schemaPath:"#/$defs/account/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};
571
573
  if(vErrors === null){
572
574
  vErrors = [err47];
573
575
  }
@@ -576,10 +578,8 @@ vErrors.push(err47);
576
578
  }
577
579
  errors++;
578
580
  }
579
- }
580
- if(data21.id !== undefined){
581
- if(typeof data21.id !== "string"){
582
- const err48 = {instancePath:instancePath+"/siteOwner/id",schemaPath:"#/$defs/account/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
581
+ if(!((data23 === "user") || (data23 === "organization"))){
582
+ const err48 = {instancePath:instancePath+"/siteOwner/type",schemaPath:"#/$defs/account/properties/type/enum",keyword:"enum",params:{allowedValues: schema20.properties.type.enum},message:"must be equal to one of the allowed values"};
583
583
  if(vErrors === null){
584
584
  vErrors = [err48];
585
585
  }
@@ -589,9 +589,9 @@ vErrors.push(err48);
589
589
  errors++;
590
590
  }
591
591
  }
592
- if(data21.name !== undefined){
593
- if(typeof data21.name !== "string"){
594
- const err49 = {instancePath:instancePath+"/siteOwner/name",schemaPath:"#/$defs/account/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
592
+ if(data22.id !== undefined){
593
+ if(typeof data22.id !== "string"){
594
+ const err49 = {instancePath:instancePath+"/siteOwner/id",schemaPath:"#/$defs/account/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
595
595
  if(vErrors === null){
596
596
  vErrors = [err49];
597
597
  }
@@ -601,9 +601,9 @@ vErrors.push(err49);
601
601
  errors++;
602
602
  }
603
603
  }
604
- if(data21.department !== undefined){
605
- if(typeof data21.department !== "string"){
606
- const err50 = {instancePath:instancePath+"/siteOwner/department",schemaPath:"#/$defs/account/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
604
+ if(data22.name !== undefined){
605
+ if(typeof data22.name !== "string"){
606
+ const err50 = {instancePath:instancePath+"/siteOwner/name",schemaPath:"#/$defs/account/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
607
607
  if(vErrors === null){
608
608
  vErrors = [err50];
609
609
  }
@@ -613,9 +613,9 @@ vErrors.push(err50);
613
613
  errors++;
614
614
  }
615
615
  }
616
- if(data21.departmentName !== undefined){
617
- if(typeof data21.departmentName !== "string"){
618
- const err51 = {instancePath:instancePath+"/siteOwner/departmentName",schemaPath:"#/$defs/account/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
616
+ if(data22.department !== undefined){
617
+ if(typeof data22.department !== "string"){
618
+ const err51 = {instancePath:instancePath+"/siteOwner/department",schemaPath:"#/$defs/account/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
619
619
  if(vErrors === null){
620
620
  vErrors = [err51];
621
621
  }
@@ -625,9 +625,9 @@ vErrors.push(err51);
625
625
  errors++;
626
626
  }
627
627
  }
628
- }
629
- else {
630
- const err52 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/type",keyword:"type",params:{type: "object"},message:"must be object"};
628
+ if(data22.departmentName !== undefined){
629
+ if(typeof data22.departmentName !== "string"){
630
+ const err52 = {instancePath:instancePath+"/siteOwner/departmentName",schemaPath:"#/$defs/account/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
631
631
  if(vErrors === null){
632
632
  vErrors = [err52];
633
633
  }
@@ -639,7 +639,7 @@ errors++;
639
639
  }
640
640
  }
641
641
  else {
642
- const err53 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
642
+ const err53 = {instancePath:instancePath+"/siteOwner",schemaPath:"#/$defs/account/type",keyword:"type",params:{type: "object"},message:"must be object"};
643
643
  if(vErrors === null){
644
644
  vErrors = [err53];
645
645
  }
@@ -648,6 +648,18 @@ vErrors.push(err53);
648
648
  }
649
649
  errors++;
650
650
  }
651
+ }
652
+ }
653
+ else {
654
+ const err54 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
655
+ if(vErrors === null){
656
+ vErrors = [err54];
657
+ }
658
+ else {
659
+ vErrors.push(err54);
660
+ }
661
+ errors++;
662
+ }
651
663
  validate15.errors = vErrors;
652
664
  return errors === 0;
653
665
  }
@@ -720,7 +732,7 @@ vErrors.push(err4);
720
732
  errors++;
721
733
  }
722
734
  for(const key1 in data1){
723
- if(!((((((key1 === "id") || (key1 === "name")) || (key1 === "role")) || (key1 === "department")) || (key1 === "departmentName")) || (key1 === "dflt"))){
735
+ if(!(((((((key1 === "id") || (key1 === "name")) || (key1 === "role")) || (key1 === "roleLabel")) || (key1 === "department")) || (key1 === "departmentName")) || (key1 === "dflt"))){
724
736
  const err5 = {instancePath:instancePath+"/organization",schemaPath:"#/$defs/organizationMembership/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
725
737
  if(vErrors === null){
726
738
  vErrors = [err5];
@@ -767,9 +779,9 @@ vErrors.push(err8);
767
779
  errors++;
768
780
  }
769
781
  }
770
- if(data1.department !== undefined){
771
- if(typeof data1.department !== "string"){
772
- const err9 = {instancePath:instancePath+"/organization/department",schemaPath:"#/$defs/organizationMembership/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
782
+ if(data1.roleLabel !== undefined){
783
+ if(typeof data1.roleLabel !== "string"){
784
+ const err9 = {instancePath:instancePath+"/organization/roleLabel",schemaPath:"#/$defs/organizationMembership/properties/roleLabel/type",keyword:"type",params:{type: "string"},message:"must be string"};
773
785
  if(vErrors === null){
774
786
  vErrors = [err9];
775
787
  }
@@ -779,9 +791,9 @@ vErrors.push(err9);
779
791
  errors++;
780
792
  }
781
793
  }
782
- if(data1.departmentName !== undefined){
783
- if(typeof data1.departmentName !== "string"){
784
- const err10 = {instancePath:instancePath+"/organization/departmentName",schemaPath:"#/$defs/organizationMembership/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
794
+ if(data1.department !== undefined){
795
+ if(typeof data1.department !== "string"){
796
+ const err10 = {instancePath:instancePath+"/organization/department",schemaPath:"#/$defs/organizationMembership/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
785
797
  if(vErrors === null){
786
798
  vErrors = [err10];
787
799
  }
@@ -791,10 +803,9 @@ vErrors.push(err10);
791
803
  errors++;
792
804
  }
793
805
  }
794
- if(data1.dflt !== undefined){
795
- let data7 = data1.dflt;
796
- if(!((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7)))){
797
- const err11 = {instancePath:instancePath+"/organization/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
806
+ if(data1.departmentName !== undefined){
807
+ if(typeof data1.departmentName !== "string"){
808
+ const err11 = {instancePath:instancePath+"/organization/departmentName",schemaPath:"#/$defs/organizationMembership/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
798
809
  if(vErrors === null){
799
810
  vErrors = [err11];
800
811
  }
@@ -803,8 +814,11 @@ vErrors.push(err11);
803
814
  }
804
815
  errors++;
805
816
  }
806
- if(!(data7 === 1)){
807
- const err12 = {instancePath:instancePath+"/organization/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/enum",keyword:"enum",params:{allowedValues: schema18.properties.dflt.enum},message:"must be equal to one of the allowed values"};
817
+ }
818
+ if(data1.dflt !== undefined){
819
+ let data8 = data1.dflt;
820
+ if(!((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8)))){
821
+ const err12 = {instancePath:instancePath+"/organization/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
808
822
  if(vErrors === null){
809
823
  vErrors = [err12];
810
824
  }
@@ -813,10 +827,8 @@ vErrors.push(err12);
813
827
  }
814
828
  errors++;
815
829
  }
816
- }
817
- }
818
- else {
819
- const err13 = {instancePath:instancePath+"/organization",schemaPath:"#/$defs/organizationMembership/type",keyword:"type",params:{type: "object"},message:"must be object"};
830
+ if(!(data8 === 1)){
831
+ const err13 = {instancePath:instancePath+"/organization/dflt",schemaPath:"#/$defs/organizationMembership/properties/dflt/enum",keyword:"enum",params:{allowedValues: schema18.properties.dflt.enum},message:"must be equal to one of the allowed values"};
820
832
  if(vErrors === null){
821
833
  vErrors = [err13];
822
834
  }
@@ -826,11 +838,9 @@ vErrors.push(err13);
826
838
  errors++;
827
839
  }
828
840
  }
829
- if(data.account !== undefined){
830
- let data8 = data.account;
831
- if(data8 && typeof data8 == "object" && !Array.isArray(data8)){
832
- if(data8.type === undefined){
833
- const err14 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};
841
+ }
842
+ else {
843
+ const err14 = {instancePath:instancePath+"/organization",schemaPath:"#/$defs/organizationMembership/type",keyword:"type",params:{type: "object"},message:"must be object"};
834
844
  if(vErrors === null){
835
845
  vErrors = [err14];
836
846
  }
@@ -839,8 +849,12 @@ vErrors.push(err14);
839
849
  }
840
850
  errors++;
841
851
  }
842
- if(data8.id === undefined){
843
- const err15 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
852
+ }
853
+ if(data.account !== undefined){
854
+ let data9 = data.account;
855
+ if(data9 && typeof data9 == "object" && !Array.isArray(data9)){
856
+ if(data9.type === undefined){
857
+ const err15 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};
844
858
  if(vErrors === null){
845
859
  vErrors = [err15];
846
860
  }
@@ -849,8 +863,8 @@ vErrors.push(err15);
849
863
  }
850
864
  errors++;
851
865
  }
852
- if(data8.name === undefined){
853
- const err16 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};
866
+ if(data9.id === undefined){
867
+ const err16 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
854
868
  if(vErrors === null){
855
869
  vErrors = [err16];
856
870
  }
@@ -859,9 +873,8 @@ vErrors.push(err16);
859
873
  }
860
874
  errors++;
861
875
  }
862
- for(const key2 in data8){
863
- if(!(((((key2 === "type") || (key2 === "id")) || (key2 === "name")) || (key2 === "department")) || (key2 === "departmentName"))){
864
- const err17 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
876
+ if(data9.name === undefined){
877
+ const err17 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};
865
878
  if(vErrors === null){
866
879
  vErrors = [err17];
867
880
  }
@@ -870,11 +883,9 @@ vErrors.push(err17);
870
883
  }
871
884
  errors++;
872
885
  }
873
- }
874
- if(data8.type !== undefined){
875
- let data9 = data8.type;
876
- if(typeof data9 !== "string"){
877
- const err18 = {instancePath:instancePath+"/account/type",schemaPath:"#/$defs/account/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};
886
+ for(const key2 in data9){
887
+ if(!(((((key2 === "type") || (key2 === "id")) || (key2 === "name")) || (key2 === "department")) || (key2 === "departmentName"))){
888
+ const err18 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
878
889
  if(vErrors === null){
879
890
  vErrors = [err18];
880
891
  }
@@ -883,8 +894,11 @@ vErrors.push(err18);
883
894
  }
884
895
  errors++;
885
896
  }
886
- if(!((data9 === "user") || (data9 === "organization"))){
887
- const err19 = {instancePath:instancePath+"/account/type",schemaPath:"#/$defs/account/properties/type/enum",keyword:"enum",params:{allowedValues: schema20.properties.type.enum},message:"must be equal to one of the allowed values"};
897
+ }
898
+ if(data9.type !== undefined){
899
+ let data10 = data9.type;
900
+ if(typeof data10 !== "string"){
901
+ const err19 = {instancePath:instancePath+"/account/type",schemaPath:"#/$defs/account/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};
888
902
  if(vErrors === null){
889
903
  vErrors = [err19];
890
904
  }
@@ -893,10 +907,8 @@ vErrors.push(err19);
893
907
  }
894
908
  errors++;
895
909
  }
896
- }
897
- if(data8.id !== undefined){
898
- if(typeof data8.id !== "string"){
899
- const err20 = {instancePath:instancePath+"/account/id",schemaPath:"#/$defs/account/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
910
+ if(!((data10 === "user") || (data10 === "organization"))){
911
+ const err20 = {instancePath:instancePath+"/account/type",schemaPath:"#/$defs/account/properties/type/enum",keyword:"enum",params:{allowedValues: schema20.properties.type.enum},message:"must be equal to one of the allowed values"};
900
912
  if(vErrors === null){
901
913
  vErrors = [err20];
902
914
  }
@@ -906,9 +918,9 @@ vErrors.push(err20);
906
918
  errors++;
907
919
  }
908
920
  }
909
- if(data8.name !== undefined){
910
- if(typeof data8.name !== "string"){
911
- const err21 = {instancePath:instancePath+"/account/name",schemaPath:"#/$defs/account/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
921
+ if(data9.id !== undefined){
922
+ if(typeof data9.id !== "string"){
923
+ const err21 = {instancePath:instancePath+"/account/id",schemaPath:"#/$defs/account/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
912
924
  if(vErrors === null){
913
925
  vErrors = [err21];
914
926
  }
@@ -918,9 +930,9 @@ vErrors.push(err21);
918
930
  errors++;
919
931
  }
920
932
  }
921
- if(data8.department !== undefined){
922
- if(typeof data8.department !== "string"){
923
- const err22 = {instancePath:instancePath+"/account/department",schemaPath:"#/$defs/account/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
933
+ if(data9.name !== undefined){
934
+ if(typeof data9.name !== "string"){
935
+ const err22 = {instancePath:instancePath+"/account/name",schemaPath:"#/$defs/account/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
924
936
  if(vErrors === null){
925
937
  vErrors = [err22];
926
938
  }
@@ -930,9 +942,9 @@ vErrors.push(err22);
930
942
  errors++;
931
943
  }
932
944
  }
933
- if(data8.departmentName !== undefined){
934
- if(typeof data8.departmentName !== "string"){
935
- const err23 = {instancePath:instancePath+"/account/departmentName",schemaPath:"#/$defs/account/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
945
+ if(data9.department !== undefined){
946
+ if(typeof data9.department !== "string"){
947
+ const err23 = {instancePath:instancePath+"/account/department",schemaPath:"#/$defs/account/properties/department/type",keyword:"type",params:{type: "string"},message:"must be string"};
936
948
  if(vErrors === null){
937
949
  vErrors = [err23];
938
950
  }
@@ -942,9 +954,9 @@ vErrors.push(err23);
942
954
  errors++;
943
955
  }
944
956
  }
945
- }
946
- else {
947
- const err24 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/type",keyword:"type",params:{type: "object"},message:"must be object"};
957
+ if(data9.departmentName !== undefined){
958
+ if(typeof data9.departmentName !== "string"){
959
+ const err24 = {instancePath:instancePath+"/account/departmentName",schemaPath:"#/$defs/account/properties/departmentName/type",keyword:"type",params:{type: "string"},message:"must be string"};
948
960
  if(vErrors === null){
949
961
  vErrors = [err24];
950
962
  }
@@ -954,9 +966,9 @@ vErrors.push(err24);
954
966
  errors++;
955
967
  }
956
968
  }
957
- if(data.accountRole !== undefined){
958
- if(typeof data.accountRole !== "string"){
959
- const err25 = {instancePath:instancePath+"/accountRole",schemaPath:"#/properties/accountRole/type",keyword:"type",params:{type: "string"},message:"must be string"};
969
+ }
970
+ else {
971
+ const err25 = {instancePath:instancePath+"/account",schemaPath:"#/$defs/account/type",keyword:"type",params:{type: "object"},message:"must be object"};
960
972
  if(vErrors === null){
961
973
  vErrors = [err25];
962
974
  }
@@ -966,9 +978,9 @@ vErrors.push(err25);
966
978
  errors++;
967
979
  }
968
980
  }
969
- if(data.siteRole !== undefined){
970
- if(typeof data.siteRole !== "string"){
971
- const err26 = {instancePath:instancePath+"/siteRole",schemaPath:"#/properties/siteRole/type",keyword:"type",params:{type: "string"},message:"must be string"};
981
+ if(data.accountRole !== undefined){
982
+ if(typeof data.accountRole !== "string"){
983
+ const err26 = {instancePath:instancePath+"/accountRole",schemaPath:"#/properties/accountRole/type",keyword:"type",params:{type: "string"},message:"must be string"};
972
984
  if(vErrors === null){
973
985
  vErrors = [err26];
974
986
  }
@@ -978,9 +990,9 @@ vErrors.push(err26);
978
990
  errors++;
979
991
  }
980
992
  }
981
- if(data.lang !== undefined){
982
- if(typeof data.lang !== "string"){
983
- const err27 = {instancePath:instancePath+"/lang",schemaPath:"#/properties/lang/type",keyword:"type",params:{type: "string"},message:"must be string"};
993
+ if(data.siteRole !== undefined){
994
+ if(typeof data.siteRole !== "string"){
995
+ const err27 = {instancePath:instancePath+"/siteRole",schemaPath:"#/properties/siteRole/type",keyword:"type",params:{type: "string"},message:"must be string"};
984
996
  if(vErrors === null){
985
997
  vErrors = [err27];
986
998
  }
@@ -990,9 +1002,9 @@ vErrors.push(err27);
990
1002
  errors++;
991
1003
  }
992
1004
  }
993
- if(data.dark !== undefined){
994
- if(typeof data.dark !== "boolean"){
995
- const err28 = {instancePath:instancePath+"/dark",schemaPath:"#/properties/dark/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
1005
+ if(data.lang !== undefined){
1006
+ if(typeof data.lang !== "string"){
1007
+ const err28 = {instancePath:instancePath+"/lang",schemaPath:"#/properties/lang/type",keyword:"type",params:{type: "string"},message:"must be string"};
996
1008
  if(vErrors === null){
997
1009
  vErrors = [err28];
998
1010
  }
@@ -1002,9 +1014,9 @@ vErrors.push(err28);
1002
1014
  errors++;
1003
1015
  }
1004
1016
  }
1005
- }
1006
- else {
1007
- const err29 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
1017
+ if(data.dark !== undefined){
1018
+ if(typeof data.dark !== "boolean"){
1019
+ const err29 = {instancePath:instancePath+"/dark",schemaPath:"#/properties/dark/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
1008
1020
  if(vErrors === null){
1009
1021
  vErrors = [err29];
1010
1022
  }
@@ -1013,6 +1025,18 @@ vErrors.push(err29);
1013
1025
  }
1014
1026
  errors++;
1015
1027
  }
1028
+ }
1029
+ }
1030
+ else {
1031
+ const err30 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
1032
+ if(vErrors === null){
1033
+ vErrors = [err30];
1034
+ }
1035
+ else {
1036
+ vErrors.push(err30);
1037
+ }
1038
+ errors++;
1039
+ }
1016
1040
  validate14.errors = vErrors;
1017
1041
  return errors === 0;
1018
1042
  }
@@ -44,6 +44,9 @@ declare const _default: {
44
44
  role: {
45
45
  type: string;
46
46
  };
47
+ roleLabel: {
48
+ type: string;
49
+ };
47
50
  department: {
48
51
  type: string;
49
52
  };
package/session/schema.js CHANGED
@@ -48,6 +48,9 @@ export default {
48
48
  role: {
49
49
  type: 'string'
50
50
  },
51
+ roleLabel: {
52
+ type: 'string'
53
+ },
51
54
  department: {
52
55
  type: 'string'
53
56
  },