913 |
913 |
email=email,
|
914 |
914 |
ip=ip,
|
915 |
915 |
)
|
|
916 |
|
|
917 |
@endpoint(
|
|
918 |
name='platform',
|
|
919 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
920 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
921 |
r'fondsaide/$',
|
|
922 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/fondsaide/',
|
|
923 |
description=_('Get beneficiary help funds'),
|
|
924 |
perm='can_access',
|
|
925 |
parameters=parameters(
|
|
926 |
{
|
|
927 |
'platform_id': {
|
|
928 |
'description': _('Platform numeric identifier'),
|
|
929 |
'example_value': '11',
|
|
930 |
},
|
|
931 |
'beneficiary_id': {
|
|
932 |
'description': _('Beneficiary numeric identifier'),
|
|
933 |
'example_value': '12',
|
|
934 |
},
|
|
935 |
}
|
|
936 |
),
|
|
937 |
display_category=_('Platform'),
|
|
938 |
display_order=11,
|
|
939 |
json_schema_response=response_schema(
|
|
940 |
{
|
|
941 |
'type': 'array',
|
|
942 |
'items': {
|
|
943 |
'type': 'object',
|
|
944 |
'properties': {
|
|
945 |
'id': {'type': 'integer'},
|
|
946 |
'cod_tfi': {'type': 'string'},
|
|
947 |
'lib_tfi': {'type': 'string'},
|
|
948 |
'demande': {
|
|
949 |
'type': 'object',
|
|
950 |
'properties': {
|
|
951 |
'montant': {'type': 'number'},
|
|
952 |
'date': DATE_SCHEMA,
|
|
953 |
}
|
|
954 |
},
|
|
955 |
'avis_pi': {
|
|
956 |
'type': 'object',
|
|
957 |
'properties': {
|
|
958 |
'montant': {'type': 'number'},
|
|
959 |
'date': DATE_SCHEMA,
|
|
960 |
'avis': {'type': 'string'},
|
|
961 |
}
|
|
962 |
},
|
|
963 |
'avis_sai': {
|
|
964 |
'type': 'object',
|
|
965 |
'properties': {
|
|
966 |
'montant': {'type': 'number'},
|
|
967 |
'date': DATE_SCHEMA,
|
|
968 |
}
|
|
969 |
},
|
|
970 |
'clos': OUI_NON_ENUM,
|
|
971 |
},
|
|
972 |
},
|
|
973 |
}
|
|
974 |
),
|
|
975 |
)
|
|
976 |
def platform_beneficiaire_fondsaide(
|
|
977 |
self, request, platform_id, beneficiary_id, email, ip=None
|
|
978 |
):
|
|
979 |
return self.get(
|
|
980 |
'platform/%s/beneficiaire/%s/fondsaide/' % (platform_id, beneficiary_id),
|
|
981 |
email=email,
|
|
982 |
ip=ip,
|
|
983 |
)
|
|
984 |
|
|
985 |
@endpoint(
|
|
986 |
name='platform',
|
|
987 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
988 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
989 |
r'fondsaide/(?P<fondsaide_id>[0-9]{1,10})/$',
|
|
990 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/fondsaide/{fondsaide_id}/',
|
|
991 |
description=_('Get beneficiary help fund details'),
|
|
992 |
perm='can_access',
|
|
993 |
parameters=parameters(
|
|
994 |
{
|
|
995 |
'platform_id': {
|
|
996 |
'description': _('Platform numeric identifier'),
|
|
997 |
'example_value': '11',
|
|
998 |
},
|
|
999 |
'beneficiary_id': {
|
|
1000 |
'description': _('Beneficiary numeric identifier'),
|
|
1001 |
'example_value': '12',
|
|
1002 |
},
|
|
1003 |
'fondsaide_id': {
|
|
1004 |
'description': _('Help fund numeric identifier'),
|
|
1005 |
'example_value': '7',
|
|
1006 |
},
|
|
1007 |
}
|
|
1008 |
),
|
|
1009 |
display_category=_('Platform'),
|
|
1010 |
display_order=12,
|
|
1011 |
json_schema_response=response_schema(
|
|
1012 |
{
|
|
1013 |
'type': 'object',
|
|
1014 |
}
|
|
1015 |
),
|
|
1016 |
)
|
|
1017 |
def platform_beneficiaire_fondsaide_detail(
|
|
1018 |
self, request, platform_id, beneficiary_id, fondsaide_id, email, ip=None
|
|
1019 |
):
|
|
1020 |
return self.get(
|
|
1021 |
'platform/%s/beneficiaire/%s/fondsaide/%s/' % (platform_id, beneficiary_id, fondsaide_id),
|
|
1022 |
email=email,
|
|
1023 |
ip=ip,
|
|
1024 |
)
|
|
1025 |
|
|
1026 |
@endpoint(
|
|
1027 |
name='platform',
|
|
1028 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
1029 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
1030 |
r'affectation/$',
|
|
1031 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/affectation/',
|
|
1032 |
description=_('Get beneficiary affectations'),
|
|
1033 |
perm='can_access',
|
|
1034 |
parameters=parameters(
|
|
1035 |
{
|
|
1036 |
'platform_id': {
|
|
1037 |
'description': _('Platform numeric identifier'),
|
|
1038 |
'example_value': '11',
|
|
1039 |
},
|
|
1040 |
'beneficiary_id': {
|
|
1041 |
'description': _('Beneficiary numeric identifier'),
|
|
1042 |
'example_value': '12',
|
|
1043 |
},
|
|
1044 |
}
|
|
1045 |
),
|
|
1046 |
display_category=_('Platform'),
|
|
1047 |
display_order=13,
|
|
1048 |
json_schema_response=response_schema(
|
|
1049 |
{
|
|
1050 |
'type': 'array',
|
|
1051 |
'items': {
|
|
1052 |
'type': 'object',
|
|
1053 |
'properties': {
|
|
1054 |
'id': {'type': 'integer'},
|
|
1055 |
'dispositif': {'type': 'string'},
|
|
1056 |
'plateforme': {'type': 'string'},
|
|
1057 |
'code_pi': {'type': 'string'},
|
|
1058 |
'referent': {'type': 'string'},
|
|
1059 |
'date_deb': DATE_SCHEMA,
|
|
1060 |
'origine': {'type': 'string'},
|
|
1061 |
},
|
|
1062 |
},
|
|
1063 |
}
|
|
1064 |
),
|
|
1065 |
)
|
|
1066 |
def platform_beneficiaire_affectation(
|
|
1067 |
self, request, platform_id, beneficiary_id, email, ip=None
|
|
1068 |
):
|
|
1069 |
return self.get(
|
|
1070 |
'platform/%s/beneficiaire/%s/affectation/' % (platform_id, beneficiary_id),
|
|
1071 |
email=email,
|
|
1072 |
ip=ip,
|
|
1073 |
)
|
|
1074 |
|
|
1075 |
@endpoint(
|
|
1076 |
name='platform',
|
|
1077 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
1078 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
1079 |
r'affectation/(?P<affectation_id>[0-9]{1,10})/$',
|
|
1080 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/affectation/{affectation_id}/',
|
|
1081 |
description=_('Get beneficiary affectation details'),
|
|
1082 |
perm='can_access',
|
|
1083 |
parameters=parameters(
|
|
1084 |
{
|
|
1085 |
'platform_id': {
|
|
1086 |
'description': _('Platform numeric identifier'),
|
|
1087 |
'example_value': '11',
|
|
1088 |
},
|
|
1089 |
'beneficiary_id': {
|
|
1090 |
'description': _('Beneficiary numeric identifier'),
|
|
1091 |
'example_value': '12',
|
|
1092 |
},
|
|
1093 |
'affectation_id': {
|
|
1094 |
'description': _('Help fund numeric identifier'),
|
|
1095 |
'example_value': '7',
|
|
1096 |
},
|
|
1097 |
}
|
|
1098 |
),
|
|
1099 |
display_category=_('Platform'),
|
|
1100 |
display_order=14,
|
|
1101 |
json_schema_response=response_schema(
|
|
1102 |
{
|
|
1103 |
'type': 'object',
|
|
1104 |
'properties': {
|
|
1105 |
'id': {'type': 'integer'},
|
|
1106 |
'dispositif': {'type': 'string'},
|
|
1107 |
'plateforme': {'type': 'string'},
|
|
1108 |
'referent': {
|
|
1109 |
'type': 'object',
|
|
1110 |
'properties': {
|
|
1111 |
'nom': {'type': 'string'},
|
|
1112 |
'prenom': {'type': 'string'},
|
|
1113 |
}
|
|
1114 |
},
|
|
1115 |
'code_pi': {'type': 'string'},
|
|
1116 |
'date_deb': DATE_SCHEMA,
|
|
1117 |
'origine': {'type': 'string'},
|
|
1118 |
'erreur': OUI_NON_ENUM,
|
|
1119 |
'date_deb': DATE_SCHEMA,
|
|
1120 |
'origin': {'type': 'string'},
|
|
1121 |
'prescripteur': {
|
|
1122 |
'type': 'object',
|
|
1123 |
'properties': {
|
|
1124 |
'type': {'type': 'string'},
|
|
1125 |
'dispositif': {'type': 'string'},
|
|
1126 |
'plateforme': {'type': 'string'},
|
|
1127 |
},
|
|
1128 |
},
|
|
1129 |
'rendez-vous': {
|
|
1130 |
'type': 'object',
|
|
1131 |
'properties': {
|
|
1132 |
'date_prise': DATE_SCHEMA,
|
|
1133 |
'relance': {
|
|
1134 |
'type': 'object',
|
|
1135 |
'properties': {
|
|
1136 |
'date': DATE_SCHEMA,
|
|
1137 |
'motif': {'type': 'string'},
|
|
1138 |
'lib_motif': {'type': 'string'},
|
|
1139 |
},
|
|
1140 |
},
|
|
1141 |
'date_reelle': DATE_SCHEMA,
|
|
1142 |
'resultat': {'type': 'string'},
|
|
1143 |
'lib_resultat': {'type': 'string'},
|
|
1144 |
}
|
|
1145 |
},
|
|
1146 |
'fin': {
|
|
1147 |
'type': 'object',
|
|
1148 |
'properties': {
|
|
1149 |
'date': DATE_SCHEMA,
|
|
1150 |
'motif': {'type': 'string'},
|
|
1151 |
'lib_motif': {'type': 'string'},
|
|
1152 |
}
|
|
1153 |
},
|
|
1154 |
'commentaire_ref': {'type': 'string'},
|
|
1155 |
},
|
|
1156 |
}
|
|
1157 |
),
|
|
1158 |
)
|
|
1159 |
def platform_beneficiaire_affectation_detail(
|
|
1160 |
self, request, platform_id, beneficiary_id, affectation_id, email, ip=None
|
|
1161 |
):
|
|
1162 |
return self.get(
|
|
1163 |
'platform/%s/beneficiaire/%s/affectation/%s/' % (platform_id, beneficiary_id, affectation_id),
|
|
1164 |
email=email,
|
|
1165 |
ip=ip,
|
|
1166 |
)
|
|
1167 |
|
|
1168 |
@endpoint(
|
|
1169 |
name='platform',
|
|
1170 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
1171 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
1172 |
r'convo/$',
|
|
1173 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/convo/',
|
|
1174 |
description=_('Get beneficiary convocations'),
|
|
1175 |
perm='can_access',
|
|
1176 |
parameters=parameters(
|
|
1177 |
{
|
|
1178 |
'platform_id': {
|
|
1179 |
'description': _('Platform numeric identifier'),
|
|
1180 |
'example_value': '11',
|
|
1181 |
},
|
|
1182 |
'beneficiary_id': {
|
|
1183 |
'description': _('Beneficiary numeric identifier'),
|
|
1184 |
'example_value': '12',
|
|
1185 |
},
|
|
1186 |
}
|
|
1187 |
),
|
|
1188 |
display_category=_('Platform'),
|
|
1189 |
display_order=15,
|
|
1190 |
json_schema_response=response_schema(
|
|
1191 |
{
|
|
1192 |
'type': 'array',
|
|
1193 |
'items': {
|
|
1194 |
"type": "object",
|
|
1195 |
"properties": {
|
|
1196 |
"convos_par_motif": {
|
|
1197 |
"type": "array",
|
|
1198 |
"items": {
|
|
1199 |
"type": "object",
|
|
1200 |
"properties": {
|
|
1201 |
"nombre": {"type": "integer"},
|
|
1202 |
"motif": {"type": "string"},
|
|
1203 |
}
|
|
1204 |
},
|
|
1205 |
},
|
|
1206 |
"derniere_consequence": {
|
|
1207 |
"type": "object",
|
|
1208 |
"properties": {
|
|
1209 |
"date": DATE_SCHEMA,
|
|
1210 |
"consequence": {"type": "string"},
|
|
1211 |
}
|
|
1212 |
}
|
|
1213 |
}
|
|
1214 |
},
|
|
1215 |
}
|
|
1216 |
),
|
|
1217 |
)
|
|
1218 |
def platform_beneficiaire_convo(
|
|
1219 |
self, request, platform_id, beneficiary_id, email, ip=None
|
|
1220 |
):
|
|
1221 |
return self.get(
|
|
1222 |
'platform/%s/beneficiaire/%s/convo/' % (platform_id, beneficiary_id),
|
|
1223 |
email=email,
|
|
1224 |
ip=ip,
|
|
1225 |
)
|
|
1226 |
|
|
1227 |
@endpoint(
|
|
1228 |
name='platform',
|
|
1229 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
1230 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
1231 |
r'emploi/$',
|
|
1232 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/emploi/',
|
|
1233 |
description=_('Get beneficiary emploiyments'),
|
|
1234 |
perm='can_access',
|
|
1235 |
parameters=parameters(
|
|
1236 |
{
|
|
1237 |
'platform_id': {
|
|
1238 |
'description': _('Platform numeric identifier'),
|
|
1239 |
'example_value': '11',
|
|
1240 |
},
|
|
1241 |
'beneficiary_id': {
|
|
1242 |
'description': _('Beneficiary numeric identifier'),
|
|
1243 |
'example_value': '12',
|
|
1244 |
},
|
|
1245 |
}
|
|
1246 |
),
|
|
1247 |
display_category=_('Platform'),
|
|
1248 |
display_order=16,
|
|
1249 |
json_schema_response=response_schema(
|
|
1250 |
{
|
|
1251 |
'type': 'array',
|
|
1252 |
'items': {
|
|
1253 |
"type": "object",
|
|
1254 |
"properties": {
|
|
1255 |
"id": {"type": "string"},
|
|
1256 |
"code_axe": {"type": "string"},
|
|
1257 |
"lib_axe": {"type": "string"},
|
|
1258 |
"code_rome": {"type": "string"},
|
|
1259 |
"lib_rome": {"type": "string"},
|
|
1260 |
"code_categorie": {"type": "string"},
|
|
1261 |
"lib_categorie": {"type": "string"},
|
|
1262 |
"lib_secteur": {"type": "string"},
|
|
1263 |
"lib_niveau": {"type": "string"},
|
|
1264 |
"lib_modalite": {"type": "string"},
|
|
1265 |
"date_inscription": DATE_SCHEMA,
|
|
1266 |
"date_sortie": DATE_SCHEMA,
|
|
1267 |
"motif_sortie": {"type": "string"},
|
|
1268 |
"date_dernier_ent": DATE_SCHEMA,
|
|
1269 |
},
|
|
1270 |
},
|
|
1271 |
}
|
|
1272 |
),
|
|
1273 |
)
|
|
1274 |
def platform_beneficiaire_emploi(
|
|
1275 |
self, request, platform_id, beneficiary_id, email, ip=None
|
|
1276 |
):
|
|
1277 |
return self.get(
|
|
1278 |
'platform/%s/beneficiaire/%s/emploi/' % (platform_id, beneficiary_id),
|
|
1279 |
email=email,
|
|
1280 |
ip=ip,
|
|
1281 |
)
|