@base44-preview/cli 0.0.50-pr.477.43f5b00 → 0.0.50-pr.480.b87871d
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.
- package/dist/cli/index.js +62 -3
- package/dist/cli/index.js.map +5 -5
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -241538,12 +241538,27 @@ var ToolConfigSchema = exports_external.union([
|
|
|
241538
241538
|
EntityToolConfigSchema,
|
|
241539
241539
|
BackendFunctionToolConfigSchema
|
|
241540
241540
|
]);
|
|
241541
|
+
var EntityAccessRuleSchema = exports_external.union([
|
|
241542
|
+
exports_external.boolean(),
|
|
241543
|
+
exports_external.record(exports_external.string(), exports_external.unknown())
|
|
241544
|
+
]);
|
|
241545
|
+
var AgentAccessConfigSchema = exports_external.object({
|
|
241546
|
+
entities: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), EntityAccessRuleSchema)).optional().default({}),
|
|
241547
|
+
functions: exports_external.array(exports_external.string()).optional().default([])
|
|
241548
|
+
});
|
|
241549
|
+
var CodeModeConfigSchema = exports_external.object({
|
|
241550
|
+
access: AgentAccessConfigSchema.optional().default({
|
|
241551
|
+
entities: {},
|
|
241552
|
+
functions: []
|
|
241553
|
+
})
|
|
241554
|
+
});
|
|
241541
241555
|
var AgentConfigSchema = exports_external.looseObject({
|
|
241542
241556
|
name: exports_external.string().trim().min(1).max(100),
|
|
241543
241557
|
description: exports_external.string().trim().min(1, "Description is required"),
|
|
241544
241558
|
instructions: exports_external.string().trim().min(1, "Instructions are required"),
|
|
241545
241559
|
tool_configs: exports_external.array(ToolConfigSchema).optional().default([]),
|
|
241546
|
-
whatsapp_greeting: exports_external.string().nullable().optional()
|
|
241560
|
+
whatsapp_greeting: exports_external.string().nullable().optional(),
|
|
241561
|
+
code_mode: CodeModeConfigSchema.optional()
|
|
241547
241562
|
});
|
|
241548
241563
|
var SyncAgentsResponseSchema = exports_external.object({
|
|
241549
241564
|
created: exports_external.array(exports_external.string()),
|
|
@@ -242594,11 +242609,51 @@ var EntityAutomationSchema = AutomationBaseSchema.extend({
|
|
|
242594
242609
|
entity_name: exports_external.string().min(1, "Entity name cannot be empty"),
|
|
242595
242610
|
event_types: exports_external.array(exports_external.enum(["create", "update", "delete"])).min(1, "At least one event type is required")
|
|
242596
242611
|
});
|
|
242612
|
+
var KnownConditionOperators = [
|
|
242613
|
+
"equals",
|
|
242614
|
+
"not_equals",
|
|
242615
|
+
"gt",
|
|
242616
|
+
"gte",
|
|
242617
|
+
"lt",
|
|
242618
|
+
"lte",
|
|
242619
|
+
"contains",
|
|
242620
|
+
"not_contains",
|
|
242621
|
+
"starts_with",
|
|
242622
|
+
"ends_with",
|
|
242623
|
+
"in_list",
|
|
242624
|
+
"not_in_list",
|
|
242625
|
+
"exists",
|
|
242626
|
+
"not_exists",
|
|
242627
|
+
"is_empty",
|
|
242628
|
+
"is_not_empty"
|
|
242629
|
+
];
|
|
242630
|
+
var ConditionOperatorSchema = exports_external.union([
|
|
242631
|
+
exports_external.enum(KnownConditionOperators),
|
|
242632
|
+
exports_external.string().min(1)
|
|
242633
|
+
]);
|
|
242634
|
+
var TriggerConditionSchema = exports_external.object({
|
|
242635
|
+
field: exports_external.string().min(1),
|
|
242636
|
+
operator: ConditionOperatorSchema,
|
|
242637
|
+
value: exports_external.unknown().nullable().optional()
|
|
242638
|
+
});
|
|
242639
|
+
var TriggerLogicSchema = exports_external.enum(["and", "or"]);
|
|
242640
|
+
var TriggerConditionGroupSchema = exports_external.lazy(() => exports_external.object({
|
|
242641
|
+
logic: TriggerLogicSchema.optional(),
|
|
242642
|
+
conditions: exports_external.array(exports_external.union([TriggerConditionSchema, TriggerConditionGroupSchema])).min(1)
|
|
242643
|
+
}));
|
|
242644
|
+
var ConnectorAutomationSchema = AutomationBaseSchema.extend({
|
|
242645
|
+
type: exports_external.literal("connector"),
|
|
242646
|
+
integration_type: IntegrationTypeSchema,
|
|
242647
|
+
events: exports_external.array(exports_external.string()),
|
|
242648
|
+
resource_id: exports_external.string().nullable().optional(),
|
|
242649
|
+
trigger_conditions: TriggerConditionGroupSchema.nullable().optional()
|
|
242650
|
+
});
|
|
242597
242651
|
var AutomationSchema = exports_external.union([
|
|
242598
242652
|
ScheduledOneTimeSchema,
|
|
242599
242653
|
ScheduledCronSchema,
|
|
242600
242654
|
ScheduledSimpleSchema,
|
|
242601
|
-
EntityAutomationSchema
|
|
242655
|
+
EntityAutomationSchema,
|
|
242656
|
+
ConnectorAutomationSchema
|
|
242602
242657
|
]);
|
|
242603
242658
|
var FunctionConfigSchema = exports_external.object({
|
|
242604
242659
|
name: FunctionNameSchema,
|
|
@@ -253089,9 +253144,13 @@ function createFunctionRouter(manager, logger2) {
|
|
|
253089
253144
|
on: {
|
|
253090
253145
|
proxyReq: (proxyReq, req) => {
|
|
253091
253146
|
const xAppId = req.headers["x-app-id"];
|
|
253147
|
+
const authorization = req.headers.authorization;
|
|
253092
253148
|
if (xAppId) {
|
|
253093
253149
|
proxyReq.setHeader("Base44-App-Id", xAppId);
|
|
253094
253150
|
}
|
|
253151
|
+
if (authorization) {
|
|
253152
|
+
proxyReq.setHeader("Base44-Service-Authorization", authorization);
|
|
253153
|
+
}
|
|
253095
253154
|
proxyReq.setHeader("Base44-Api-Url", `${req.protocol}://${req.headers.host}`);
|
|
253096
253155
|
},
|
|
253097
253156
|
error: (err, _req, res) => {
|
|
@@ -260193,4 +260252,4 @@ export {
|
|
|
260193
260252
|
CLIExitError
|
|
260194
260253
|
};
|
|
260195
260254
|
|
|
260196
|
-
//# debugId=
|
|
260255
|
+
//# debugId=C6E0C5B984DF777364756E2164756E21
|