Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_dynamic_business_logic.c File Reference

Executes framework-owned declarative action contracts for dynamic apps. More...

#include "native_dynamic_business_logic.h"
#include "native_dynamic_multipart.h"
#include "native_dynamic_request_fields.h"
#include "native_fs.h"
#include "native_http_response.h"
#include "native_support.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  InputFieldValueLogicLocal
struct  InputFieldMapLogicLocal
struct  ActionExecutionContextLogicLocal
struct  ActionEffectCountsLogicLocal
struct  ParsedHttpUrlLogicLocal
struct  OutboundHttpResultLogicLocal

Functions

static char * request_body_bytes_dup_logic_local (const HttpRequest *request, size_t *out_size)
static char * request_form_value_dup_logic_local (const HttpRequest *request, const char *field_name)
static void write_json_error_logic_local (NativeConnection *connection, int status, const char *status_text, const char *error_kind, const char *message)
static int now_iso_utc_logic_local (char out[20])
static char * app_manifest_path_dup_logic_local (const AppRuntime *app)
static char * fixture_path_dup_logic_local (const AppRuntime *app, const char *fixture_key)
static yyjson_docload_fixture_doc_logic_local (const AppRuntime *app, const char *fixture_key)
static yyjson_valfind_action_contract_logic_local (yyjson_val *root, const char *action_id)
static yyjson_valfind_workflow_transition_logic_local (yyjson_val *root, const char *action_id, yyjson_val **workflow_out)
static void free_action_execution_context_logic_local (ActionExecutionContextLogicLocal *context)
static void free_parsed_http_url_logic_local (ParsedHttpUrlLogicLocal *url)
static void free_outbound_http_result_logic_local (OutboundHttpResultLogicLocal *result)
static int now_plus_seconds_iso_utc_logic_local (long offset_seconds, char out[20])
static int replace_owned_string_logic_local (char **slot, const char *value)
static int note_created_record_logic_local (ActionExecutionContextLogicLocal *context, long record_id, const char *resource_id)
static int note_updated_record_logic_local (ActionExecutionContextLogicLocal *context, long record_id, const char *resource_id)
static int note_bounded_scope_logic_local (ActionExecutionContextLogicLocal *context, long matched_count, long applied_count, const char *overflow_policy)
static void free_input_field_map_logic_local (InputFieldMapLogicLocal *map)
static char * input_field_value_dup_logic_local (const InputFieldMapLogicLocal *map, const char *field_id)
static char * action_presentation_string_dup_logic_local (yyjson_val *action_contract, const char *field_name)
static char * workflow_presentation_string_dup_logic_local (yyjson_val *transition, const char *field_name)
static int load_action_inputs_logic_local (const HttpRequest *request, yyjson_val *action_contract, InputFieldMapLogicLocal *map, char **error_message_out)
static char * string_value_from_contract_logic_local (yyjson_val *value_contract, const InputFieldMapLogicLocal *inputs, const ActionExecutionContextLogicLocal *context, const char *list_item_text, yyjson_val *source_record_context)
static yyjson_mut_valfield_value_from_contract_logic_local (yyjson_mut_doc *doc, yyjson_val *value_contract, const InputFieldMapLogicLocal *inputs, long next_id, yyjson_val *record_context, const ActionExecutionContextLogicLocal *context, const char *list_item_text, yyjson_val *source_record_context)
static int append_list_item_logic_local (char ***items_out, size_t *count_out, const char *start, size_t length)
static void free_split_items_logic_local (char **items, size_t count)
static int split_input_list_logic_local (const char *raw_value, const char *delimiter, char ***items_out, size_t *count_out)
static int set_mut_object_field_logic_local (yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *field_name, yyjson_mut_val *value)
static char * scoped_resource_id_dup_logic_local (const char *collection_name, const char *field_name, const char *expected_text)
static int record_field_matches_text_value_logic_local (yyjson_val *record, const char *field_name, const char *expected_text)
static int record_field_matches_text_logic_local (yyjson_mut_val *record, const char *field_name, const char *expected_text)
static char * scope_match_expected_text_dup_logic_local (yyjson_val *scope_match, const InputFieldMapLogicLocal *inputs, const ActionExecutionContextLogicLocal *context)
static long matching_record_count_value_logic_local (yyjson_val *collection, const char *scope_field, const char *expected_text)
static long matching_record_count_logic_local (yyjson_mut_val *collection, const char *scope_field, const char *expected_text)
static int append_record_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, const ActionExecutionContextLogicLocal *context, long next_id, long *created_record_id_out, char **resource_id_out)
static yyjson_mut_valfind_mut_record_by_long_field_logic_local (yyjson_mut_val *array, const char *field_name, long match_value)
static int append_records_from_input_list_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, ActionExecutionContextLogicLocal *context, long next_id, long *created_count_out, char **resource_id_out)
static yyjson_mut_valfind_mut_record_by_id_logic_local (yyjson_mut_val *collection, long record_id)
static int append_records_from_related_collection_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *source_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, ActionExecutionContextLogicLocal *context, long next_id, long *created_count_out, char **resource_id_out)
static int update_record_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, ActionExecutionContextLogicLocal *context, char **resource_id_out, char **from_state_out, char **to_state_out)
static int scoped_reassignment_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *source_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, ActionExecutionContextLogicLocal *context, char **resource_id_out)
static int bulk_update_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, ActionExecutionContextLogicLocal *context, char **resource_id_out, char **from_state_out, char **to_state_out)
static int set_root_fields_primitive_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *primitive, const InputFieldMapLogicLocal *inputs, const ActionExecutionContextLogicLocal *context, long next_id)
static long next_section_id_logic_local (yyjson_mut_val *root, const char *section_name)
static yyjson_mut_valensure_mut_array_field_logic_local (yyjson_mut_doc *doc, yyjson_mut_val *root, const char *field_name)
static int append_mut_object_to_array_logic_local (yyjson_mut_doc *doc, yyjson_mut_val *root, const char *section_name, yyjson_mut_val *obj)
static yyjson_valfind_integration_adapter_logic_local (yyjson_val *root, const char *adapter_id)
static char * integration_adapter_target_url_dup_logic_local (yyjson_val *adapter)
static int parse_http_url_logic_local (const char *url, ParsedHttpUrlLogicLocal *parsed)
static int append_bytes_logic_local (char **buffer, size_t *length, size_t *capacity, const char *chunk, size_t chunk_len)
static int outbound_http_post_logic_local (const char *target_url, const char *content_type, const char *payload_json, OutboundHttpResultLogicLocal *result)
static char * effect_payload_json_dup_logic_local (const char *action_id, const char *adapter_id, const char *resource_id, const char *replay_trace_id, const char *created_at)
static int append_job_attempt_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, long job_execution_id, const char *execution_status, const char *payload_json, const char *created_at, const char *error_message)
static int process_webhook_delivery_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_mut_val *delivery, const char *created_at, const char *payload_json)
static int process_due_integration_deliveries_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, const char *created_at, const char *payload_json)
static int append_action_report_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *action_contract, yyjson_val *workflow, yyjson_val *transition, const ActionExecutionContextLogicLocal *context, const ActionEffectCountsLogicLocal *effect_counts, const char *resource_id, const char *from_state, const char *to_state, const char *created_at, const char *policy_gate, const char *success_message, const char *operator_summary, const char *transition_label, const char *from_state_label, const char *to_state_label, long workflow_execution_id, long created_record_id, char **report_json_out, char **replay_trace_id_out)
static int append_workflow_and_effects_logic_local (const AppRuntime *app, yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *action_contract, yyjson_val *workflow, yyjson_val *transition, const InputFieldMapLogicLocal *inputs, const ActionExecutionContextLogicLocal *context, const char *policy_gate, const char *resource_id, const char *from_state, const char *to_state, const char *created_at, const char *replay_trace_id, long *workflow_execution_id_out, ActionEffectCountsLogicLocal *effect_counts_out)
static int append_audit_event_logic_local (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *transition, const char *resource_id, const char *created_at, const char *replay_trace_id, const char *report_json, const char *from_state, const char *to_state)
static int persist_mut_doc_logic_local (const AppRuntime *app, yyjson_mut_doc *mut_doc)
static const char * http_reason_phrase_logic_local (int status)
 Resolves a minimal HTTP reason phrase for framework-owned responses.
static int send_redirect_logic_local (NativeConnection *connection, const AppRuntime *app, yyjson_val *response_contract)
 Sends a declarative redirect response contract.
static int send_json_action_result_logic_local (NativeConnection *connection, yyjson_val *response_contract, const char *action_id, const char *resource_id, long workflow_execution_id, const char *report_json, yyjson_mut_doc *mut_doc)
 Sends a declarative JSON action-result response contract.
static int send_action_response_logic_local (NativeConnection *connection, const AppRuntime *app, yyjson_val *response_contract, const char *action_id, const char *resource_id, long workflow_execution_id, const char *report_json, yyjson_mut_doc *mut_doc)
 Sends the configured declarative response contract for an action.
int native_dynamic_action_presentation_dup (const AppRuntime *app, const char *action_id, char **submit_label_out, char **summary_out)
 Loads declarative presentation overrides for one action contract.
int native_dynamic_execute_declarative_action (NativeConnection *connection, const AppRuntime *app, const HttpRequest *request, const char *action_id)
 Executes one declarative dynamic-app action contract against JSON state.

Detailed Description

Executes framework-owned declarative action contracts for dynamic apps.

Definition in file native_dynamic_business_logic.c.

Function Documentation

◆ action_presentation_string_dup_logic_local()

char * action_presentation_string_dup_logic_local ( yyjson_val * action_contract,
const char * field_name )
static

◆ app_manifest_path_dup_logic_local()

char * app_manifest_path_dup_logic_local ( const AppRuntime * app)
static

Definition at line 129 of file native_dynamic_business_logic.c.

References AppRuntime::app_root, and path_join().

Referenced by fixture_path_dup_logic_local().

◆ append_action_report_logic_local()

int append_action_report_logic_local ( yyjson_mut_doc * mut_doc,
yyjson_mut_val * mut_root,
yyjson_val * action_contract,
yyjson_val * workflow,
yyjson_val * transition,
const ActionExecutionContextLogicLocal * context,
const ActionEffectCountsLogicLocal * effect_counts,
const char * resource_id,
const char * from_state,
const char * to_state,
const char * created_at,
const char * policy_gate,
const char * success_message,
const char * operator_summary,
const char * transition_label,
const char * from_state_label,
const char * to_state_label,
long workflow_execution_id,
long created_record_id,
char ** report_json_out,
char ** replay_trace_id_out )
static

◆ append_audit_event_logic_local()

int append_audit_event_logic_local ( yyjson_mut_doc * mut_doc,
yyjson_mut_val * mut_root,
yyjson_val * transition,
const char * resource_id,
const char * created_at,
const char * replay_trace_id,
const char * report_json,
const char * from_state,
const char * to_state )
static

◆ append_bytes_logic_local()

int append_bytes_logic_local ( char ** buffer,
size_t * length,
size_t * capacity,
const char * chunk,
size_t chunk_len )
static

Definition at line 1898 of file native_dynamic_business_logic.c.

Referenced by outbound_http_post_logic_local().

◆ append_job_attempt_logic_local()

int append_job_attempt_logic_local ( yyjson_mut_doc * mut_doc,
yyjson_mut_val * mut_root,
long job_execution_id,
const char * execution_status,
const char * payload_json,
const char * created_at,
const char * error_message )
static

◆ append_list_item_logic_local()

int append_list_item_logic_local ( char *** items_out,
size_t * count_out,
const char * start,
size_t length )
static

Definition at line 676 of file native_dynamic_business_logic.c.

References dup_range(), and trim_in_place().

Referenced by split_input_list_logic_local().

◆ append_mut_object_to_array_logic_local()

int append_mut_object_to_array_logic_local ( yyjson_mut_doc * doc,
yyjson_mut_val * root,
const char * section_name,
yyjson_mut_val * obj )
static

◆ append_record_primitive_logic_local()

◆ append_records_from_input_list_primitive_logic_local()

◆ append_records_from_related_collection_primitive_logic_local()

◆ append_workflow_and_effects_logic_local()

int append_workflow_and_effects_logic_local ( const AppRuntime * app,
yyjson_mut_doc * mut_doc,
yyjson_mut_val * mut_root,
yyjson_val * action_contract,
yyjson_val * workflow,
yyjson_val * transition,
const InputFieldMapLogicLocal * inputs,
const ActionExecutionContextLogicLocal * context,
const char * policy_gate,
const char * resource_id,
const char * from_state,
const char * to_state,
const char * created_at,
const char * replay_trace_id,
long * workflow_execution_id_out,
ActionEffectCountsLogicLocal * effect_counts_out )
static

◆ bulk_update_primitive_logic_local()

◆ effect_payload_json_dup_logic_local()

char * effect_payload_json_dup_logic_local ( const char * action_id,
const char * adapter_id,
const char * resource_id,
const char * replay_trace_id,
const char * created_at )
static

◆ ensure_mut_array_field_logic_local()

◆ field_value_from_contract_logic_local()

◆ find_action_contract_logic_local()

◆ find_integration_adapter_logic_local()

yyjson_val * find_integration_adapter_logic_local ( yyjson_val * root,
const char * adapter_id )
static

◆ find_mut_record_by_id_logic_local()

yyjson_mut_val * find_mut_record_by_id_logic_local ( yyjson_mut_val * collection,
long record_id )
static

◆ find_mut_record_by_long_field_logic_local()

yyjson_mut_val * find_mut_record_by_long_field_logic_local ( yyjson_mut_val * array,
const char * field_name,
long match_value )
static

◆ find_workflow_transition_logic_local()

yyjson_val * find_workflow_transition_logic_local ( yyjson_val * root,
const char * action_id,
yyjson_val ** workflow_out )
static

◆ fixture_path_dup_logic_local()

◆ free_action_execution_context_logic_local()

◆ free_input_field_map_logic_local()

◆ free_outbound_http_result_logic_local()

void free_outbound_http_result_logic_local ( OutboundHttpResultLogicLocal * result)
static

◆ free_parsed_http_url_logic_local()

◆ free_split_items_logic_local()

void free_split_items_logic_local ( char ** items,
size_t count )
static

◆ http_reason_phrase_logic_local()

const char * http_reason_phrase_logic_local ( int status)
static

Resolves a minimal HTTP reason phrase for framework-owned responses.

Parameters
statusHTTP status code.
Returns
Static reason phrase string.

Definition at line 2834 of file native_dynamic_business_logic.c.

Referenced by send_json_action_result_logic_local().

◆ input_field_value_dup_logic_local()

◆ integration_adapter_target_url_dup_logic_local()

char * integration_adapter_target_url_dup_logic_local ( yyjson_val * adapter)
static

◆ load_action_inputs_logic_local()

◆ load_fixture_doc_logic_local()

yyjson_doc * load_fixture_doc_logic_local ( const AppRuntime * app,
const char * fixture_key )
static

◆ matching_record_count_logic_local()

long matching_record_count_logic_local ( yyjson_mut_val * collection,
const char * scope_field,
const char * expected_text )
static

◆ matching_record_count_value_logic_local()

long matching_record_count_value_logic_local ( yyjson_val * collection,
const char * scope_field,
const char * expected_text )
static

◆ native_dynamic_action_presentation_dup()

int native_dynamic_action_presentation_dup ( const AppRuntime * app,
const char * action_id,
char ** submit_label_out,
char ** summary_out )

Loads declarative presentation overrides for one action contract.

Parameters
appFinalized app runtime metadata.
action_idAction identifier to inspect.
submit_label_outOptional duplicated submit label.
summary_outOptional duplicated summary text.
Returns
1 when the action contract was found, otherwise 0.

Definition at line 3027 of file native_dynamic_business_logic.c.

References find_action_contract_logic_local(), load_fixture_doc_logic_local(), native_json_doc_free(), native_json_obj_get(), native_json_obj_get_string_dup(), and yyjson_doc_get_root().

Referenced by proof_home_page_params_json_dup_runtime().

◆ native_dynamic_execute_declarative_action()

int native_dynamic_execute_declarative_action ( NativeConnection * connection,
const AppRuntime * app,
const HttpRequest * request,
const char * action_id )

Executes one declarative dynamic-app action contract against JSON state.

The shared runtime uses this helper for framework-owned action contracts that express typed inputs, mutation primitives, workflow bindings, effect hooks, and explanation reporting declaratively in app fixtures.

Parameters
connectionConnection that receives any error or redirect response.
appFinalized app runtime metadata.
requestParsed HTTP request.
action_idAction identifier from the matched route.
Returns
HTTP status code when the helper handled the action, or 0 when no matching declarative contract exists for the app/action pair.

Definition at line 3047 of file native_dynamic_business_logic.c.

References action_presentation_string_dup_logic_local(), ActionExecutionContextLogicLocal::anchor_record_id, ActionExecutionContextLogicLocal::anchor_resource_id, append_action_report_logic_local(), append_audit_event_logic_local(), append_record_primitive_logic_local(), append_records_from_input_list_primitive_logic_local(), append_records_from_related_collection_primitive_logic_local(), append_workflow_and_effects_logic_local(), bulk_update_primitive_logic_local(), ActionExecutionContextLogicLocal::created_record_count, find_action_contract_logic_local(), find_workflow_transition_logic_local(), free_action_execution_context_logic_local(), free_input_field_map_logic_local(), ActionExecutionContextLogicLocal::last_created_record_id, ActionExecutionContextLogicLocal::last_touched_resource_id, load_action_inputs_logic_local(), load_fixture_doc_logic_local(), native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), note_created_record_logic_local(), now_iso_utc_logic_local(), persist_mut_doc_logic_local(), scoped_reassignment_primitive_logic_local(), send_action_response_logic_local(), set_mut_object_field_logic_local(), set_root_fields_primitive_logic_local(), AppRuntime::state_path, streq(), update_record_primitive_logic_local(), workflow_presentation_string_dup_logic_local(), write_json_error_logic_local(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_doc_get_root(), yyjson_doc_mut_copy(), yyjson_is_arr(), yyjson_is_obj(), yyjson_mut_doc_free(), yyjson_mut_doc_get_root(), yyjson_mut_int(), and yyjson_mut_is_obj().

Referenced by handle_action_route().

◆ next_section_id_logic_local()

◆ note_bounded_scope_logic_local()

◆ note_created_record_logic_local()

◆ note_updated_record_logic_local()

◆ now_iso_utc_logic_local()

int now_iso_utc_logic_local ( char out[20])
static

◆ now_plus_seconds_iso_utc_logic_local()

int now_plus_seconds_iso_utc_logic_local ( long offset_seconds,
char out[20] )
static

◆ outbound_http_post_logic_local()

◆ parse_http_url_logic_local()

◆ persist_mut_doc_logic_local()

int persist_mut_doc_logic_local ( const AppRuntime * app,
yyjson_mut_doc * mut_doc )
static

◆ process_due_integration_deliveries_logic_local()

int process_due_integration_deliveries_logic_local ( yyjson_mut_doc * mut_doc,
yyjson_mut_val * mut_root,
const char * created_at,
const char * payload_json )
static

◆ process_webhook_delivery_logic_local()

◆ record_field_matches_text_logic_local()

int record_field_matches_text_logic_local ( yyjson_mut_val * record,
const char * field_name,
const char * expected_text )
static

◆ record_field_matches_text_value_logic_local()

◆ replace_owned_string_logic_local()

int replace_owned_string_logic_local ( char ** slot,
const char * value )
static

◆ request_body_bytes_dup_logic_local()

char * request_body_bytes_dup_logic_local ( const HttpRequest * request,
size_t * out_size )
static

◆ request_form_value_dup_logic_local()

char * request_form_value_dup_logic_local ( const HttpRequest * request,
const char * field_name )
static

◆ scope_match_expected_text_dup_logic_local()

◆ scoped_reassignment_primitive_logic_local()

◆ scoped_resource_id_dup_logic_local()

char * scoped_resource_id_dup_logic_local ( const char * collection_name,
const char * field_name,
const char * expected_text )
static

◆ send_action_response_logic_local()

int send_action_response_logic_local ( NativeConnection * connection,
const AppRuntime * app,
yyjson_val * response_contract,
const char * action_id,
const char * resource_id,
long workflow_execution_id,
const char * report_json,
yyjson_mut_doc * mut_doc )
static

Sends the configured declarative response contract for an action.

Parameters
connectionConnection receiving the response.
appFinalized app runtime metadata.
response_contractDeclarative response contract object.
action_idExecuted action identifier.
resource_idTouched or created resource identifier.
workflow_execution_idPersisted workflow execution identifier.
report_jsonSerialized framework action report JSON.
mut_docMutated state document after the action applied.
Returns
HTTP status code written to the connection.

Definition at line 3006 of file native_dynamic_business_logic.c.

References native_json_obj_get_string_dup(), send_json_action_result_logic_local(), send_redirect_logic_local(), and streq().

Referenced by native_dynamic_execute_declarative_action().

◆ send_json_action_result_logic_local()

int send_json_action_result_logic_local ( NativeConnection * connection,
yyjson_val * response_contract,
const char * action_id,
const char * resource_id,
long workflow_execution_id,
const char * report_json,
yyjson_mut_doc * mut_doc )
static

Sends a declarative JSON action-result response contract.

The response is framework-owned and exposes a stable generic envelope with action metadata, the persisted action report, and optional post-action state.

Parameters
connectionConnection receiving the response.
response_contractDeclarative response contract object.
action_idExecuted action identifier.
resource_idTouched or created resource identifier.
workflow_execution_idPersisted workflow execution identifier.
report_jsonSerialized framework action report JSON.
mut_docMutated state document after the action applied.
Returns
HTTP status code written to the connection, or 500 on formatting failure.

Definition at line 2903 of file native_dynamic_business_logic.c.

References http_reason_phrase_logic_local(), native_connection_printf(), native_json_doc_free(), native_json_doc_load_text(), native_json_obj_get(), native_json_obj_get_long_default(), native_send_text_response(), yyjson_doc_get_root(), yyjson_get_bool(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_bool(), yyjson_mut_obj_add_int(), yyjson_mut_obj_add_strcpy(), yyjson_mut_obj_put(), yyjson_mut_strcpy(), yyjson_mut_write(), yyjson_val_mut_copy(), and YYJSON_WRITE_NOFLAG.

Referenced by send_action_response_logic_local().

◆ send_redirect_logic_local()

int send_redirect_logic_local ( NativeConnection * connection,
const AppRuntime * app,
yyjson_val * response_contract )
static

Sends a declarative redirect response contract.

Parameters
connectionConnection receiving the response.
appFinalized app runtime metadata.
response_contractDeclarative response contract object.
Returns
HTTP status code written to the connection.

Definition at line 2865 of file native_dynamic_business_logic.c.

References AppRuntime::base_path, native_connection_printf(), and native_json_obj_get_string_dup().

Referenced by send_action_response_logic_local().

◆ set_mut_object_field_logic_local()

◆ set_root_fields_primitive_logic_local()

◆ split_input_list_logic_local()

int split_input_list_logic_local ( const char * raw_value,
const char * delimiter,
char *** items_out,
size_t * count_out )
static

◆ string_value_from_contract_logic_local()

◆ update_record_primitive_logic_local()

◆ workflow_presentation_string_dup_logic_local()

char * workflow_presentation_string_dup_logic_local ( yyjson_val * transition,
const char * field_name )
static

◆ write_json_error_logic_local()

void write_json_error_logic_local ( NativeConnection * connection,
int status,
const char * status_text,
const char * error_kind,
const char * message )
static