business-as-code 0.0.2 → 0.2.0
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/README.md +209 -379
- package/dist/index.d.ts +4 -146
- package/dist/index.js +1051 -143
- package/dist/index.js.map +1 -0
- package/dist/loaders/index.d.ts +174 -0
- package/dist/loaders/index.js +366 -0
- package/dist/loaders/index.js.map +1 -0
- package/dist/schema/index.d.ts +146 -0
- package/dist/schema/index.js +716 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/types-CJ9eGS_C.d.ts +86 -0
- package/package.json +55 -36
package/dist/index.d.ts
CHANGED
|
@@ -1,146 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
workflows?: Record<string, Workflow>;
|
|
6
|
-
agents?: Record<string, Agent>;
|
|
7
|
-
businessModel?: BusinessModel;
|
|
8
|
-
execute(): Promise<void>;
|
|
9
|
-
launch(): Promise<void>;
|
|
10
|
-
addExperiment(experiment: ExperimentInterface): void;
|
|
11
|
-
}
|
|
12
|
-
interface Objective {
|
|
13
|
-
description: string;
|
|
14
|
-
keyResults: string[] | KeyResult[];
|
|
15
|
-
}
|
|
16
|
-
interface KeyResult {
|
|
17
|
-
description: string;
|
|
18
|
-
target?: number;
|
|
19
|
-
currentValue?: number;
|
|
20
|
-
unit?: string;
|
|
21
|
-
dueDate?: Date;
|
|
22
|
-
}
|
|
23
|
-
interface ExperimentInterface {
|
|
24
|
-
name: string;
|
|
25
|
-
hypothesis: string;
|
|
26
|
-
variants: Record<string, ExperimentVariant>;
|
|
27
|
-
metrics: string[];
|
|
28
|
-
trafficSplit: Record<string, number>;
|
|
29
|
-
targetObjective?: Objective;
|
|
30
|
-
start(): Promise<void>;
|
|
31
|
-
stop(): Promise<void>;
|
|
32
|
-
analyze(): Promise<ExperimentResults>;
|
|
33
|
-
}
|
|
34
|
-
interface ExperimentVariant {
|
|
35
|
-
workflow?: Workflow | string;
|
|
36
|
-
agent?: Agent | string;
|
|
37
|
-
function?: Function | string;
|
|
38
|
-
configuration?: Record<string, any>;
|
|
39
|
-
}
|
|
40
|
-
interface ExperimentResults {
|
|
41
|
-
variantPerformance: Record<string, VariantPerformance>;
|
|
42
|
-
winner?: string;
|
|
43
|
-
confidence?: number;
|
|
44
|
-
insights: string[];
|
|
45
|
-
}
|
|
46
|
-
interface VariantPerformance {
|
|
47
|
-
metrics: Record<string, number>;
|
|
48
|
-
sampleSize: number;
|
|
49
|
-
}
|
|
50
|
-
interface BusinessModel {
|
|
51
|
-
leanCanvas?: LeanCanvasModel;
|
|
52
|
-
storyBrand?: StoryBrandModel;
|
|
53
|
-
valueProposition?: ValuePropositionModel;
|
|
54
|
-
revenueStreams?: RevenueStream[];
|
|
55
|
-
customerSegments?: CustomerSegment[];
|
|
56
|
-
}
|
|
57
|
-
interface LeanCanvasModel {
|
|
58
|
-
problem: string[];
|
|
59
|
-
solution: string[];
|
|
60
|
-
uniqueValueProposition: string;
|
|
61
|
-
unfairAdvantage?: string;
|
|
62
|
-
customerSegments: string[];
|
|
63
|
-
keyMetrics: string[];
|
|
64
|
-
channels: string[];
|
|
65
|
-
costStructure: string[];
|
|
66
|
-
revenueStreams: string[];
|
|
67
|
-
}
|
|
68
|
-
interface StoryBrandModel {
|
|
69
|
-
hero: string;
|
|
70
|
-
problem: string;
|
|
71
|
-
guide: string;
|
|
72
|
-
plan: string[];
|
|
73
|
-
callToAction: string;
|
|
74
|
-
failure: string;
|
|
75
|
-
success: string;
|
|
76
|
-
}
|
|
77
|
-
interface ValuePropositionModel {
|
|
78
|
-
customerJobs: string[];
|
|
79
|
-
pains: string[];
|
|
80
|
-
gains: string[];
|
|
81
|
-
products: string[];
|
|
82
|
-
painRelievers: string[];
|
|
83
|
-
gainCreators: string[];
|
|
84
|
-
}
|
|
85
|
-
interface RevenueStream {
|
|
86
|
-
name: string;
|
|
87
|
-
type: 'subscription' | 'transactional' | 'service' | 'product' | 'other';
|
|
88
|
-
pricingModel: string;
|
|
89
|
-
estimatedRevenue?: number;
|
|
90
|
-
}
|
|
91
|
-
interface CustomerSegment {
|
|
92
|
-
name: string;
|
|
93
|
-
description: string;
|
|
94
|
-
needs: string[];
|
|
95
|
-
demographics?: Record<string, string>;
|
|
96
|
-
behaviors?: string[];
|
|
97
|
-
}
|
|
98
|
-
interface Workflow {
|
|
99
|
-
name: string;
|
|
100
|
-
steps: WorkflowStep[];
|
|
101
|
-
execute(input?: any): Promise<any>;
|
|
102
|
-
}
|
|
103
|
-
interface WorkflowStep {
|
|
104
|
-
name: string;
|
|
105
|
-
function?: Function | string;
|
|
106
|
-
agent?: Agent | string;
|
|
107
|
-
input?: Record<string, any> | ((context: any) => any);
|
|
108
|
-
condition?: (context: any) => boolean;
|
|
109
|
-
onSuccess?: WorkflowStep | string;
|
|
110
|
-
onError?: WorkflowStep | string;
|
|
111
|
-
}
|
|
112
|
-
interface Function {
|
|
113
|
-
name: string;
|
|
114
|
-
execute(input?: any): Promise<any>;
|
|
115
|
-
}
|
|
116
|
-
interface Agent {
|
|
117
|
-
name: string;
|
|
118
|
-
execute(task: string, context?: any): Promise<any>;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Creates a new Business instance
|
|
123
|
-
*/
|
|
124
|
-
declare function Business(config: Omit<BusinessInterface, 'execute' | 'launch' | 'addExperiment'>): BusinessInterface;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Creates a new Experiment instance
|
|
128
|
-
*/
|
|
129
|
-
declare function Experiment(config: Omit<ExperimentInterface, 'start' | 'stop' | 'analyze'>): ExperimentInterface;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Creates a new LeanCanvas instance
|
|
133
|
-
*/
|
|
134
|
-
declare function LeanCanvas(config: LeanCanvasModel): LeanCanvasModel;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Creates a new StoryBrand instance
|
|
138
|
-
*/
|
|
139
|
-
declare function StoryBrand(config: StoryBrandModel): StoryBrandModel;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Creates a new ValueProposition instance
|
|
143
|
-
*/
|
|
144
|
-
declare function ValueProposition(config: ValuePropositionModel): ValuePropositionModel;
|
|
145
|
-
|
|
146
|
-
export { type Agent, Business, type BusinessInterface, type BusinessModel, type CustomerSegment, Experiment, type ExperimentInterface, type ExperimentResults, type ExperimentVariant, type Function, type KeyResult, LeanCanvas, type Objective, type RevenueStream, StoryBrand, ValueProposition, type VariantPerformance, type Workflow, type WorkflowStep };
|
|
1
|
+
export { a as BusinessDomain, b as BusinessExtension, B as BusinessSchema, F as FieldShorthand, c as LoadResult, L as LoaderOptions, N as NounShorthand } from './types-CJ9eGS_C.js';
|
|
2
|
+
export { Agents, Brands, Businesses, Channels, ChartOfAccounts, Competitors, Contacts, Customers, Deals, Domains, Features, Goals, Invoices, Issues, JournalEntries, Leads, Messages, Metrics, Offers, Orgs, Payments, Posts, Prices, Processes, Products, Projects, Proposals, Quotes, Refunds, Roles, Sequences, ServiceAccounts, Services, Subscriptions, Tasks, Teams, Templates, Users, Workflows, adminNouns, businessNouns, communicationsNouns, createMinimalSchema, defaultBusinessSchema, financialNouns, findNounBySlug, getAllNouns, getDomainNouns, getDomains, marketingNouns, mergeSchemas, productNouns, salesNouns, successNouns, validateSchema, workNouns } from './schema/index.js';
|
|
3
|
+
export { load, loadFromJSON, loadFromMDX, loadFromYAML, loadNoun, loadNounFromJSON, loadNounFromMDX, loadNounFromYAML, loadNouns, loadNounsFromJSON, loadNounsFromMDX, loadNounsFromYAML, nounToJSON, nounToYAML, serialize, serializeNoun, toJSON, toYAML } from './loaders/index.js';
|
|
4
|
+
export { FieldSchema, FieldType, NounSchema } from 'db.sb';
|