Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
const getRepBody = {
type: 'object' as const,
required: ['groups', 'extraData'],
properties: {
groups: {
type: 'array' as const,
items: {
type: 'object' as const,
required: ['age', 'sex', 'medianWeight', 'population'],
properties: {
age: {
type: 'string' as const,
},
sex: {
type: 'string' as const,
},
medianWeight: {
type: 'number' as const,
},
population: {
type: 'number' as const,
},
},
},
},
extraData: {
type: 'object' as const,
properties: {
minorPAL: {
type: 'object' as const,
required: ['lowPALPrevalence', 'moderatePALPrevalence', 'intensePALPrevalence'],
properties: {
lowPALPrevalence: {
type: 'number' as const,
},
moderatePALPrevalence: {
type: 'number' as const,
},
intensePALPrevalence: {
type: 'number' as const,
},
},
},
adultPAL: {
type: 'object' as const,
required: ['urbanPercentage', 'activeUrbanPAL', 'lowUrbanPAL', 'ruralPercentage', 'activeRuralPAL', 'lowRuralPAL'],
properties: {
urbanPercentage: { type: 'number' as const },
activeUrbanPAL: { type: 'number' as const },
lowUrbanPAL: { type: 'number' as const },
ruralPercentage: { type: 'number' as const },
activeRuralPAL: { type: 'number' as const },
lowRuralPAL: { type: 'number' as const },
},
},
maternity18To29: {
type: 'object' as const,
properties: {
pregnantWomen: { type: 'number' as const },
lactatingWomen: { type: 'number' as const },
countryBirthRate: { type: 'number' as const },
countryWomenInAgeGroup: { type: 'number' as const },
countryPopulation: { type: 'number' as const },
},
oneOf: [
{
required: ['pregnantWomen', 'lactatingWomen'],
},
{
required: ['countryBirthRate', 'countryWomenInAgeGroup', 'countryPopulation'],
},
],
},
maternity30To59: {
type: 'object' as const,
properties: {
pregnantWomen: { type: 'number' as const },
lactatingWomen: { type: 'number' as const },
countryBirthRate: { type: 'number' as const },
countryWomenInAgeGroup: { type: 'number' as const },
countryPopulation: { type: 'number' as const },
},
oneOf: [
{
required: ['pregnantWomen', 'lactatingWomen'],
},
{
required: ['countryBirthRate', 'countryWomenInAgeGroup', 'countryPopulation'],
},
],
},
},
},
},
};
export default getRepBody;