@base44-preview/cli 0.0.15-pr.102.d2fdfed → 0.0.15-pr.104.3f5c540
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 +40 -78
- package/dist/cli/index.js +824 -426
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,91 +70,58 @@ base44 deploy
|
|
|
70
70
|
|---------|-------------|
|
|
71
71
|
| `base44 site deploy` | Deploy built site files to Base44 hosting |
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### Connectors
|
|
74
|
+
|
|
75
|
+
Manage OAuth integrations to connect your app with external services. Connectors are stored in the `connectors` property of your project's `config.jsonc` file.
|
|
74
76
|
|
|
75
77
|
| Command | Description |
|
|
76
78
|
|---------|-------------|
|
|
77
|
-
| `base44
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## TypeScript Type Generation
|
|
79
|
+
| `base44 connectors add [type]` | Add and connect an OAuth integration |
|
|
80
|
+
| `base44 connectors list` | List all connectors (local and connected) |
|
|
81
|
+
| `base44 connectors push` | Sync connectors with backend (connect new, remove missing) |
|
|
82
|
+
| `base44 connectors remove [type]` | Remove an integration |
|
|
83
|
+
| `base44 connectors remove [type] --hard` | Permanently remove an integration |
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### Usage
|
|
85
|
+
**Supported integrations:** Slack, Google Calendar, Google Drive, Gmail, Google Sheets, Google Docs, Google Slides, Notion, Salesforce, HubSpot, LinkedIn, TikTok
|
|
88
86
|
|
|
87
|
+
**Example workflow:**
|
|
89
88
|
```bash
|
|
90
|
-
#
|
|
91
|
-
base44
|
|
92
|
-
|
|
93
|
-
#
|
|
94
|
-
base44
|
|
89
|
+
# Add a connector interactively (saves to config.jsonc and opens OAuth)
|
|
90
|
+
base44 connectors add slack
|
|
91
|
+
|
|
92
|
+
# List connectors showing local vs connected status
|
|
93
|
+
base44 connectors list
|
|
94
|
+
# Output:
|
|
95
|
+
# ● Slack - user@example.com
|
|
96
|
+
# ○ Google Calendar (not connected)
|
|
97
|
+
|
|
98
|
+
# Sync all connectors (connects new, removes missing from config)
|
|
99
|
+
base44 connectors push
|
|
100
|
+
# Output:
|
|
101
|
+
# 1 connector to connect:
|
|
102
|
+
# + Google Calendar
|
|
103
|
+
# 1 connector to remove:
|
|
104
|
+
# - Notion (user@example.com)
|
|
105
|
+
# Apply 2 changes? (Y/n)
|
|
106
|
+
|
|
107
|
+
# Remove a single connector
|
|
108
|
+
base44 connectors remove slack
|
|
95
109
|
```
|
|
96
110
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
| File | Contents |
|
|
100
|
-
|------|----------|
|
|
101
|
-
| `entities.ts` | Entity interfaces, CreateInput, UpdateInput, Filter types |
|
|
102
|
-
| `client.ts` | Typed SDK client interface |
|
|
103
|
-
| `index.ts` | Barrel exports |
|
|
104
|
-
|
|
105
|
-
### Setup with @base44/sdk
|
|
106
|
-
|
|
107
|
-
1. Generate types:
|
|
108
|
-
```bash
|
|
109
|
-
base44 types
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
2. Add to `tsconfig.json`:
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"include": ["src", "src/base44/entities.ts"]
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
3. Use in your code:
|
|
120
|
-
```typescript
|
|
121
|
-
import { createClient } from '@base44/sdk';
|
|
122
|
-
import type { TypedBase44Client } from './base44/client';
|
|
123
|
-
|
|
124
|
-
const base44 = createClient({ appId: 'my-app' }) as TypedBase44Client;
|
|
125
|
-
|
|
126
|
-
// Fully typed!
|
|
127
|
-
const { items: tasks } = await base44.entities.Task.list();
|
|
128
|
-
await base44.entities.Task.create({ title: 'Buy milk' });
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Example
|
|
132
|
-
|
|
133
|
-
Given an entity schema:
|
|
111
|
+
**Configuration** (`base44/config.jsonc`):
|
|
134
112
|
```jsonc
|
|
135
|
-
// base44/entities/task.jsonc
|
|
136
113
|
{
|
|
137
|
-
"name": "
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
"required": ["title"]
|
|
114
|
+
"name": "my-app",
|
|
115
|
+
"connectors": {
|
|
116
|
+
"slack": {},
|
|
117
|
+
"googlecalendar": { "scopes": ["calendar.readonly"] }
|
|
118
|
+
}
|
|
144
119
|
}
|
|
145
120
|
```
|
|
146
121
|
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
title: string;
|
|
151
|
-
completed?: boolean;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface TaskCreateInput {
|
|
155
|
-
title: string;
|
|
156
|
-
completed?: boolean;
|
|
157
|
-
}
|
|
122
|
+
Once connected, use the SDK's `connectors.getAccessToken()` to retrieve tokens:
|
|
123
|
+
```javascript
|
|
124
|
+
const token = await base44.connectors.getAccessToken("slack");
|
|
158
125
|
```
|
|
159
126
|
|
|
160
127
|
## Configuration
|
|
@@ -202,12 +169,7 @@ my-project/
|
|
|
202
169
|
│ └── my-function/
|
|
203
170
|
│ ├── config.jsonc
|
|
204
171
|
│ └── index.js
|
|
205
|
-
├── src/
|
|
206
|
-
│ ├── base44/ # Generated types (from `base44 types`)
|
|
207
|
-
│ │ ├── entities.ts
|
|
208
|
-
│ │ ├── client.ts
|
|
209
|
-
│ │ └── index.ts
|
|
210
|
-
│ └── ... # Your frontend code
|
|
172
|
+
├── src/ # Your frontend code
|
|
211
173
|
├── dist/ # Built site files (for deployment)
|
|
212
174
|
└── package.json
|
|
213
175
|
```
|