ApiLogicServer 14.3.25__py3-none-any.whl → 14.5.0__py3-none-any.whl
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.
- api_logic_server_cli/add_cust/add_cust.py +283 -0
- api_logic_server_cli/api_logic_server.py +18 -250
- api_logic_server_cli/api_logic_server_info.yaml +3 -3
- api_logic_server_cli/cli.py +54 -35
- api_logic_server_cli/create_from_model/__pycache__/api_logic_server_utils.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/create_db_from_model.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/dbml.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/ont_build.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/ont_create.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/api_logic_server_utils.py +47 -0
- api_logic_server_cli/create_from_model/create_db_from_model.py +2 -0
- api_logic_server_cli/create_from_model/dbml.py +113 -58
- api_logic_server_cli/create_from_model/ont_build.py +102 -74
- api_logic_server_cli/create_from_model/ont_create.py +7 -6
- api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/.DS_Store +0 -0
- api_logic_server_cli/database/basic_demo.sqlite +0 -0
- api_logic_server_cli/database/basic_demo.txt +1 -0
- api_logic_server_cli/database/basic_demo_wg.sqlite +0 -0
- api_logic_server_cli/database/nw-gold-fix.sql +62 -0
- api_logic_server_cli/database/nw-gold.sqlite +0 -0
- api_logic_server_cli/{prototypes/manager/webgenai → fragments}/docker-compose.yml +1 -1
- api_logic_server_cli/genai/genai.py +42 -11
- api_logic_server_cli/genai/genai_graphics.py +252 -38
- api_logic_server_cli/genai/genai_svcs.py +20 -12
- api_logic_server_cli/manager.py +22 -12
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/base/.DS_Store +0 -0
- api_logic_server_cli/prototypes/base/.vscode/launch.json +22 -2
- api_logic_server_cli/prototypes/base/api/expose_api_models.py +3 -1
- api_logic_server_cli/prototypes/base/api_logic_server_run.py +5 -2
- api_logic_server_cli/prototypes/base/config/activate_logicbank.py +1 -0
- api_logic_server_cli/prototypes/base/config/config.py +123 -25
- api_logic_server_cli/prototypes/base/config/default.env +7 -1
- api_logic_server_cli/prototypes/base/config/logging.yml +1 -0
- api_logic_server_cli/prototypes/base/config/server_setup.py +33 -1
- api_logic_server_cli/prototypes/base/database/test_data/readme.md +5 -2
- api_logic_server_cli/prototypes/base/devops/docker-standard-image/docker-compose-standard-image.yml +7 -2
- api_logic_server_cli/prototypes/base/docs/training/logic_bank_api.prompt +314 -0
- api_logic_server_cli/prototypes/base/docs/training/logic_example.py +41 -0
- api_logic_server_cli/prototypes/base/integration/kafka/kafka_producer.py +12 -5
- api_logic_server_cli/prototypes/base/integration/n8n/n8n_producer.py +68 -21
- api_logic_server_cli/prototypes/base/integration/n8n/n8n_readme.md +19 -0
- api_logic_server_cli/prototypes/base/integration/system/FlaskKafka.py +5 -1
- api_logic_server_cli/prototypes/base/test/basic/server_test.py +1 -1
- api_logic_server_cli/prototypes/base/ui/templates/bar_chart.jinja +64 -0
- api_logic_server_cli/prototypes/basic_demo/README.md +29 -52
- api_logic_server_cli/prototypes/basic_demo/customizations/api/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/mcp_server_executor.py +138 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/openapi.py +92 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/proper_update_def.json +71 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/config/default.env +13 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/database/db.sqlite +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/database/models.py +131 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/1_langchain_loader.py +71 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/2_gpt_mcp_prompt.txt +19 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/README_mcp.md +13 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_client_executor.py +295 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_schema.txt +47 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_server_discovery.json +9 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/multi_mcp_flow/multi_mcp_flow.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/multi_mcp_flow/multi_mcp_orchestration.yaml +49 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/multi_mcp_flow/wny mcp flows.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/natlang_to_api.py +73 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/curl.txt +5 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/images/MCP Overview.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/images/MCP_Arch.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/images/MCP_Overview_Executor.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/invoke_llm/1 - prompt_messages_array.json +10 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/invoke_llm/2 - completion_tool_context.json +12 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/llm_schema.txt +38 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/nw_swagger_2.yaml +17393 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/nw_swagger_3.yaml +16660 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/nw_swagger_3_relaxed.yaml +109 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/proxy_server.py +51 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/proxy_serverZ.py +72 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/resources/validate_jsonapi.py +64 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/run_executor.py +23 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/swagger_converter.py +65 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/z_old/3_executor_test_agent.py +52 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/3_executor_test_agent.py +52 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/README_functon.md +201 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/ai_plugin.json +17 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/nw-swagger_3.json +1731 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/snippets.txt +5 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3 genai_demo_with_get.json +1731 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3.json +1782 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3_genai_demo.json +264 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3_genai_demo_with_update.json +1782 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/logic/declare_logic.py +62 -44
- api_logic_server_cli/prototypes/basic_demo/customizations/security/declare_security.py +11 -12
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/admin.yaml +166 -0
- api_logic_server_cli/prototypes/basic_demo/iteration/api/{customize_api.py → api_discovery/order_b2b.py} +17 -23
- api_logic_server_cli/prototypes/basic_demo/iteration/database/db.sqlite +0 -0
- api_logic_server_cli/prototypes/basic_demo/iteration/integration/row_dict_maps/OrderB2B.py +6 -5
- api_logic_server_cli/prototypes/basic_demo/iteration/integration/row_dict_maps/OrderShipping.py +4 -4
- api_logic_server_cli/prototypes/basic_demo/iteration/logic/declare_logic.py +69 -43
- api_logic_server_cli/prototypes/basic_demo/iteration/ui/admin/admin.yaml +125 -50
- api_logic_server_cli/prototypes/genai_demo/ui/admin/admin.yaml +1 -1
- api_logic_server_cli/prototypes/manager/README.md +30 -4
- api_logic_server_cli/prototypes/manager/README_X.md +663 -0
- api_logic_server_cli/prototypes/manager/system/genai/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.prompt +0 -10
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.response_example +32 -10
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/002_create_db_models.prompt +4 -4
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/003_create_db_models.response +77 -47
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_informal.prompt +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/dashboard_services.jinja +83 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_dashboard_WIP.py +34 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/{graphics_services.py → graphics_services_api_xxx.py} +0 -9
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db.jinja +46 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db_each_method.jinja +36 -0
- api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/graphics.prompt +7 -3
- api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/response_format.prompt +8 -1
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.ps1 +100 -0
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.sh +116 -0
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/readme.md +7 -0
- api_logic_server_cli/prototypes/manager/system/style-guide.yaml +2 -2
- api_logic_server_cli/prototypes/manager/webgenai/README.md +6 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/count_orders_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/order_count_by_month.prompt +1 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/request copy.json +892 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/request.json +6 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/response.json +17 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/response.yaml +59 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/sales_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw/ui/admin/home.js +5 -4
- api_logic_server_cli/prototypes/nw/ui/app_model_custom.yaml +851 -1082
- api_logic_server_cli/prototypes/nw_no_cust/Tutorial.md +45 -26
- api_logic_server_cli/prototypes/nw_no_cust/api/api_discovery/openapi.py +130 -0
- api_logic_server_cli/prototypes/nw_no_cust/api/api_discovery/proper_update_def.json +71 -0
- api_logic_server_cli/prototypes/nw_no_cust/config/default.env +13 -0
- api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/count_orders_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/sales_by_employee.prompt +1 -0
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/nginx/nginx.conf +2 -2
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/package-lock.json +9725 -1180
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/package.json +6 -9
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/app/app.config.ts +2 -1
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/app/shared/app.services.config.ts +1 -1
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/assets/css/app.scss +4 -0
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/assets/i18n/en.json +1 -1
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/assets/i18n/es.json +14 -12
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.prod.ts +5 -5
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.ts +5 -5
- api_logic_server_cli/prototypes/ont_app/templates/app_config.jinja +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/date_template.html +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/detail_template.html +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/new_template.html +16 -16
- api_logic_server_cli/prototypes/ont_app/templates/textarea_template.html +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/timestamp_template.html +1 -1
- api_logic_server_cli/prototypes/sample_ai/logic/declare_logic.py +30 -13
- apilogicserver-14.5.0.dist-info/METADATA +76 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.5.0.dist-info}/RECORD +160 -88
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.5.0.dist-info}/WHEEL +1 -1
- api_logic_server_cli/prototypes/basic_demo/apply_customizations.ps1 +0 -17
- api_logic_server_cli/prototypes/basic_demo/apply_customizations.sh +0 -14
- api_logic_server_cli/prototypes/basic_demo/apply_iteration.ps1 +0 -20
- api_logic_server_cli/prototypes/basic_demo/apply_iteration.sh +0 -15
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_jsonapi_rpc.jinja +0 -37
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_unused.jinja +0 -38
- apilogicserver-14.3.25.dist-info/METADATA +0 -167
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.5.0.dist-info}/entry_points.txt +0 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.5.0.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.5.0.dist-info}/top_level.txt +0 -0
|
@@ -1,105 +1,180 @@
|
|
|
1
1
|
about:
|
|
2
|
-
date:
|
|
2
|
+
date: May 13, 2025 20:12:31
|
|
3
3
|
merged:
|
|
4
|
-
at:
|
|
5
|
-
new_attributes: '
|
|
6
|
-
new_resources: ''
|
|
7
|
-
new_tab_groups: ''
|
|
4
|
+
at: May 13, 2025 20:15:21
|
|
5
|
+
new_attributes: 'Customer.email Order.CreatedOn '
|
|
6
|
+
new_resources: 'Email '
|
|
7
|
+
new_tab_groups: 'Customer.EmailList '
|
|
8
8
|
recent_changes: works with modified safrs-react-admin
|
|
9
9
|
version: 0.0.0
|
|
10
10
|
api_root: '{http_type}://{swagger_host}:{port}/{api}'
|
|
11
|
-
authentication:
|
|
12
|
-
endpoint: '{http_type}://{swagger_host}:{port}/api/auth/login'
|
|
11
|
+
authentication: '{system-default}'
|
|
13
12
|
info:
|
|
14
|
-
number_relationships:
|
|
15
|
-
number_tables:
|
|
13
|
+
number_relationships: 4
|
|
14
|
+
number_tables: 5
|
|
15
|
+
info_toggle_checked: true
|
|
16
16
|
resources:
|
|
17
17
|
Customer:
|
|
18
18
|
attributes:
|
|
19
|
-
- label: '
|
|
20
|
-
name:
|
|
21
|
-
required: true
|
|
19
|
+
- label: ' name*'
|
|
20
|
+
name: name
|
|
22
21
|
search: true
|
|
23
22
|
sort: true
|
|
24
|
-
- name:
|
|
25
|
-
|
|
26
|
-
- name:
|
|
27
|
-
|
|
28
|
-
- name:
|
|
23
|
+
- name: balance
|
|
24
|
+
type: DECIMAL
|
|
25
|
+
- name: credit_limit
|
|
26
|
+
type: DECIMAL
|
|
27
|
+
- name: id
|
|
28
|
+
- name: email
|
|
29
|
+
- name: email_opt_out
|
|
30
|
+
type: BOOLEAN
|
|
31
|
+
description: Defines the Customer entity with a unique name, balance, and credit
|
|
32
|
+
limit.
|
|
33
|
+
info_list: Defines the Customer entity with a unique name, balance, and credit
|
|
34
|
+
limit.
|
|
29
35
|
tab_groups:
|
|
30
36
|
- direction: tomany
|
|
31
37
|
fks:
|
|
32
|
-
-
|
|
38
|
+
- customer_id
|
|
33
39
|
name: OrderList
|
|
34
40
|
resource: Order
|
|
41
|
+
- direction: tomany
|
|
42
|
+
fks:
|
|
43
|
+
- customer_id
|
|
44
|
+
name: EmailList
|
|
45
|
+
resource: Email
|
|
35
46
|
type: Customer
|
|
36
|
-
user_key:
|
|
47
|
+
user_key: name
|
|
48
|
+
Email:
|
|
49
|
+
attributes:
|
|
50
|
+
- label: ' id*'
|
|
51
|
+
name: id
|
|
52
|
+
search: true
|
|
53
|
+
sort: true
|
|
54
|
+
- name: customer_id
|
|
55
|
+
required: true
|
|
56
|
+
- name: message
|
|
57
|
+
- name: CreatedOn
|
|
58
|
+
type: DATE
|
|
59
|
+
tab_groups:
|
|
60
|
+
- direction: toone
|
|
61
|
+
fks:
|
|
62
|
+
- customer_id
|
|
63
|
+
name: customer
|
|
64
|
+
resource: Customer
|
|
65
|
+
type: Email
|
|
66
|
+
user_key: id
|
|
37
67
|
Item:
|
|
38
68
|
attributes:
|
|
39
|
-
- label: '
|
|
40
|
-
name:
|
|
69
|
+
- label: ' id*'
|
|
70
|
+
name: id
|
|
41
71
|
search: true
|
|
42
72
|
sort: true
|
|
43
|
-
- name:
|
|
44
|
-
- name:
|
|
45
|
-
|
|
46
|
-
- name:
|
|
47
|
-
|
|
73
|
+
- name: order_id
|
|
74
|
+
- name: product_id
|
|
75
|
+
required: true
|
|
76
|
+
- name: quantity
|
|
77
|
+
required: true
|
|
78
|
+
- name: amount
|
|
79
|
+
type: DECIMAL
|
|
80
|
+
- name: unit_price
|
|
81
|
+
type: DECIMAL
|
|
82
|
+
description: Defines the Item entity with quantity, amounts, and unit price details.
|
|
83
|
+
info_list: Defines the Item entity with quantity, amounts, and unit price details.
|
|
48
84
|
tab_groups:
|
|
49
85
|
- direction: toone
|
|
50
86
|
fks:
|
|
51
|
-
-
|
|
52
|
-
name:
|
|
87
|
+
- order_id
|
|
88
|
+
name: order
|
|
53
89
|
resource: Order
|
|
54
90
|
- direction: toone
|
|
55
91
|
fks:
|
|
56
|
-
-
|
|
57
|
-
name:
|
|
92
|
+
- product_id
|
|
93
|
+
name: product
|
|
58
94
|
resource: Product
|
|
59
95
|
type: Item
|
|
60
|
-
user_key:
|
|
96
|
+
user_key: id
|
|
61
97
|
Order:
|
|
62
98
|
attributes:
|
|
63
|
-
- label: '
|
|
64
|
-
name:
|
|
99
|
+
- label: ' id*'
|
|
100
|
+
name: id
|
|
65
101
|
search: true
|
|
66
102
|
sort: true
|
|
67
|
-
- name:
|
|
68
|
-
|
|
69
|
-
- name:
|
|
103
|
+
- name: customer_id
|
|
104
|
+
required: true
|
|
105
|
+
- name: notes
|
|
106
|
+
- name: amount_total
|
|
107
|
+
type: DECIMAL
|
|
108
|
+
- name: date_shipped
|
|
70
109
|
type: DATE
|
|
71
|
-
- name:
|
|
110
|
+
- name: CreatedOn
|
|
111
|
+
type: DATE
|
|
112
|
+
description: Defines the Order entity which belongs to a customer. Includes notes
|
|
113
|
+
and amount total.
|
|
114
|
+
info_list: Defines the Order entity which belongs to a customer. Includes notes
|
|
115
|
+
and amount total.
|
|
72
116
|
tab_groups:
|
|
73
117
|
- direction: tomany
|
|
74
118
|
fks:
|
|
75
|
-
-
|
|
119
|
+
- order_id
|
|
76
120
|
name: ItemList
|
|
77
121
|
resource: Item
|
|
78
122
|
- direction: toone
|
|
79
123
|
fks:
|
|
80
|
-
-
|
|
81
|
-
name:
|
|
124
|
+
- customer_id
|
|
125
|
+
name: customer
|
|
82
126
|
resource: Customer
|
|
83
127
|
type: Order
|
|
84
|
-
user_key:
|
|
128
|
+
user_key: id
|
|
85
129
|
Product:
|
|
86
130
|
attributes:
|
|
87
|
-
- label: '
|
|
88
|
-
name:
|
|
89
|
-
required: true
|
|
131
|
+
- label: ' name*'
|
|
132
|
+
name: name
|
|
90
133
|
search: true
|
|
91
134
|
sort: true
|
|
92
|
-
- name:
|
|
93
|
-
|
|
94
|
-
- name:
|
|
135
|
+
- name: unit_price
|
|
136
|
+
type: DECIMAL
|
|
137
|
+
- name: carbon_neutral
|
|
138
|
+
type: BOOLEAN
|
|
139
|
+
- name: id
|
|
140
|
+
description: Defines the Product entity with a unique name and unit price.
|
|
141
|
+
info_list: Defines the Product entity with a unique name and unit price.
|
|
95
142
|
tab_groups:
|
|
96
143
|
- direction: tomany
|
|
97
144
|
fks:
|
|
98
|
-
-
|
|
145
|
+
- product_id
|
|
99
146
|
name: ItemList
|
|
100
147
|
resource: Item
|
|
101
148
|
type: Product
|
|
102
|
-
user_key:
|
|
149
|
+
user_key: name
|
|
103
150
|
settings:
|
|
104
|
-
HomeJS:
|
|
151
|
+
HomeJS: /admin-app/home.js
|
|
105
152
|
max_list_columns: 8
|
|
153
|
+
style_guide:
|
|
154
|
+
applicationLocales:
|
|
155
|
+
- en
|
|
156
|
+
- es
|
|
157
|
+
currency_symbol: $
|
|
158
|
+
currency_symbol_position: left
|
|
159
|
+
date_format: LL
|
|
160
|
+
decimal_max: '1000000000'
|
|
161
|
+
decimal_min: '2'
|
|
162
|
+
decimal_separator: .
|
|
163
|
+
detail_mode: tab
|
|
164
|
+
edit_on_mode: dblclick
|
|
165
|
+
exclude_listpicker: false
|
|
166
|
+
include_translation: 'false'
|
|
167
|
+
keycloak_client_id: alsclient
|
|
168
|
+
keycloak_realm: kcals
|
|
169
|
+
keycloak_url: http://localhost:8080
|
|
170
|
+
locale: en
|
|
171
|
+
max_decimal_digits: '4'
|
|
172
|
+
min_decimal_digits: '2'
|
|
173
|
+
new_mode: dialog
|
|
174
|
+
pick_style: list
|
|
175
|
+
row_height: small,
|
|
176
|
+
serviceType: JSONAPI
|
|
177
|
+
startSessionPath: /auth/login
|
|
178
|
+
style: light
|
|
179
|
+
thousand_separator: ','
|
|
180
|
+
use_keycloak: 'false'
|
|
@@ -79,6 +79,10 @@ Created projects use standard Flask and SQLAlchemy; automation is provided by Lo
|
|
|
79
79
|
als create --project-name=basic_demo --db-url=basic_demo
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
+
<br>The self-demo provides:
|
|
83
|
+
1. A quick look at logic, security and integration
|
|
84
|
+
2. Integration includes Kafka and MCP (**[Model Context Protocol](https://apilogicserver.github.io/Docs/Integration-MCP/)**)
|
|
85
|
+
|
|
82
86
|
<br>To create a larger project, try the pre-installed [**northwind database**](https://apilogicserver.github.io/Docs/Tutorial/) (imagine your own database here):
|
|
83
87
|
|
|
84
88
|
```
|
|
@@ -165,20 +169,28 @@ Verify it's operating properly:
|
|
|
165
169
|
|
|
166
170
|
<summary> You can iterate the logic and data model</summary>
|
|
167
171
|
|
|
168
|
-
<br>
|
|
172
|
+
<br>The approach for an iteration is to create a new project from an existing one:
|
|
173
|
+
|
|
174
|
+
1. add another prompt to an existing projects `docs` directory, specifying your changes
|
|
175
|
+
2. use `als genai`, specifying
|
|
176
|
+
* `--using` existing projects `docs` directory, and
|
|
177
|
+
* `--project-name` as the output project
|
|
178
|
+
|
|
179
|
+
**Logic iterations** are particuarly useful. For example, here we take the basic check-credit logic, and add:
|
|
169
180
|
|
|
170
181
|
> Provide a 10% discount when buying more than 10 carbon neutral products.<br><br>The Item carbon neutral is copied from the Product carbon neutral
|
|
171
182
|
|
|
172
|
-
Explore [genai_demo_iteration_discount](system/genai/examples/genai_demo/genai_demo_iteration_discount). This will add carbon_neutral to the data model, and update the logic to provide the discount:
|
|
183
|
+
Explore [genai_demo_iteration_discount](system/genai/examples/genai_demo/genai_demo_iteration_discount). It's an iteration of basic_demo (see system/genai/examples/genai_demo/genai_demo_iteration_discount/002_create_db_models.prompt). This will add carbon_neutral to the data model, and update the logic to provide the discount:
|
|
173
184
|
|
|
174
185
|
```bash title='Iterate Business Logic'
|
|
175
186
|
# Iterate with data model and logic
|
|
176
|
-
als genai --project-name='
|
|
187
|
+
als genai --project-name='genai_demo_with_discount' --using=system/genai/examples/genai_demo/genai_demo_iteration_discount
|
|
177
188
|
# open Docs/db.dbml
|
|
178
189
|
```
|
|
190
|
+
|
|
179
191
|
<br>
|
|
180
192
|
|
|
181
|
-
You can add new columns/tables, while keeping the prior model intact:
|
|
193
|
+
You can perform **model iterations:** add new columns/tables, while keeping the prior model intact. First, we create a project with no logic, perhaps just to see the screens (this step is optional, provided just to illustrate that iterations create new projects from existing ones):
|
|
182
194
|
|
|
183
195
|
```bash title='Iterate Without Logic'
|
|
184
196
|
# Step 1 - create without logic
|
|
@@ -186,6 +198,8 @@ als genai --project-name='genai_demo_no_logic' --using=system/genai/examples/gen
|
|
|
186
198
|
# open Docs/db.dbml
|
|
187
199
|
```
|
|
188
200
|
|
|
201
|
+
Then, we would create another prompt in the docs directory with our model changes. We've already created these for you in `system/genai/examples/genai_demo/genai_demo_iteration` - we use that to alter the data model (see `system/genai/examples/genai_demo/genai_demo_iteration/004_iteration_renames_logic.prompt`):
|
|
202
|
+
|
|
189
203
|
```bash title='Iterate With Logic'
|
|
190
204
|
# Iterate with data model and logic
|
|
191
205
|
als genai --project-name='genai_demo_with_logic' --using=system/genai/examples/genai_demo/genai_demo_iteration
|
|
@@ -502,6 +516,18 @@ als create --project-name=sample_ai --from-model=sample_ai.py --db-url=sqlite
|
|
|
502
516
|
|
|
503
517
|
4. This will create your database, create an API Logic Project from it, and launch your IDE.
|
|
504
518
|
|
|
519
|
+
5. Create business logic
|
|
520
|
+
|
|
521
|
+
* You can create logic with either your IDE (and code completion), or Natural Language
|
|
522
|
+
* To use Natural Language:
|
|
523
|
+
|
|
524
|
+
1. Use the CoPilot chat,
|
|
525
|
+
2. Paste the logic above
|
|
526
|
+
3. Copy it to `logic/declare_logic.py` after `discover_logic()`
|
|
527
|
+
|
|
528
|
+
* Alert: Table and Column Names may require correction to conform to the model
|
|
529
|
+
* Alert: you may to apply [defaulting](https://apilogicserver.github.io/Docs/Logic-Use/#insert-defaulting), and initialize derived attributes in your database
|
|
530
|
+
|
|
505
531
|
</details>
|
|
506
532
|
</br>
|
|
507
533
|
|