__PACKAGE__->register_method(
- method => 'get_offline_data',
- api_name => 'open-ils.circ.offline.data.retrieve',
+ method => 'get_offline_data',
+ api_name => 'open-ils.circ.offline.data.retrieve',
+ stream => 1,
signature => {
desc => q/Returns a stream of data needed by clients to
support an offline interface. /,
my $org_ids = $U->get_org_ancestors($e->requestor->ws_ou);
$client->respond({
- idlClass => 'cnct',
+ idl_class => 'cnct',
data => $e->search_config_non_cataloged_type({owning_lib => $org_ids})
});
}
]);
- $client->respond({idlClass => 'asv', data => $surveys});
+ $client->respond({idl_class => 'asv', data => $surveys});
- $client->respond({idlClass => 'cit',
+ $client->respond({idl_class => 'cit',
data => $e->retrieve_all_config_identification_type});
- $client->respond({idlClass => 'cnal',
+ $client->respond({idl_class => 'cnal',
data => $e->retrieve_all_config_net_access_level});
- $client->respond({idlClass => 'fdoc',
+ $client->respond({idl_class => 'fdoc',
data => $e->retrieve_all_config_idl_field_doc});
my $perm_groups = $e->search_permission_grp_tree([
{flesh => 99, flesh_fields => {pgt => ['children']}}
]);
- $client->respond({idlClass => 'pgt', data => $perm_groups});
+ $client->respond({idl_class => 'pgt', data => $perm_groups});
+
+ my $stat_cats = $U->simplereq(
+ 'open-ils.circ',
+ 'open-ils.circ.stat_cat.actor.retrieve.all',
+ $auth, $e->requestor->ws_ou);
+
+ $client->respond({idl_class => 'actsc', data => $stat_cats});
+
+ my $settings = $e->search_config_usr_setting_type({
+ '-or' => [{
+ name => [qw/
+ circ.holds_behind_desk
+ circ.collections.exempt
+ opac.hold_notify
+ opac.default_phone
+ opac.default_pickup_location
+ opac.default_sms_carrier
+ opac.default_sms_notify/]
+ }, {
+ name => {
+ in => {
+ select => {atevdef => ['opt_in_setting']},
+ from => 'atevdef',
+ where => {'+atevdef' => {owner => $org_ids}}
+ }
+ }
+ }]
+ });
+
+ $client->respond($settings);
return undef;
}