@base44-preview/sdk 0.8.19-pr.127.7353bb5 → 0.8.19-pr.127.9e0f4e8
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.
|
@@ -192,7 +192,7 @@ export interface AgentsModuleConfig {
|
|
|
192
192
|
*
|
|
193
193
|
* ## Generated Types
|
|
194
194
|
*
|
|
195
|
-
* If you're working in a TypeScript project, you can generate types from your agents to get autocomplete on agent names when creating conversations or subscribing to updates. See the [
|
|
195
|
+
* If you're working in a TypeScript project, you can generate types from your agents to get autocomplete on agent names when creating conversations or subscribing to updates. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
|
|
196
196
|
*/
|
|
197
197
|
export interface AgentsModule {
|
|
198
198
|
/**
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Registry of connector integration types.
|
|
3
|
-
* Augment this interface to enable autocomplete for connector integration types.
|
|
2
|
+
* Registry of connector integration type names. The [`types generate`](/developers/references/cli/commands/types-generate) command fills this registry, then [`ConnectorIntegrationType`](#connectorintegrationtype) resolves to a union of the keys.
|
|
4
3
|
*/
|
|
5
4
|
export interface ConnectorIntegrationTypeRegistry {
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Union of all connector integration type names from the [`ConnectorIntegrationTypeRegistry`](#connectorintegrationtyperegistry). Defaults to `string` when no types have been generated.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Using generated connector type names
|
|
12
|
+
* // With generated types, you get autocomplete on integration types
|
|
13
|
+
* const token = await base44.asServiceRole.connectors.getAccessToken('googlecalendar');
|
|
14
|
+
* ```
|
|
10
15
|
*/
|
|
11
16
|
export type ConnectorIntegrationType = keyof ConnectorIntegrationTypeRegistry extends never ? string : keyof ConnectorIntegrationTypeRegistry;
|
|
12
17
|
/**
|
|
@@ -26,6 +31,10 @@ export interface ConnectorAccessTokenResponse {
|
|
|
26
31
|
* covered by Base44's pre-built integrations.
|
|
27
32
|
*
|
|
28
33
|
* This module is only available to use with a client in service role authentication mode, which means it can only be used in backend environments.
|
|
34
|
+
*
|
|
35
|
+
* ## Dynamic Types
|
|
36
|
+
*
|
|
37
|
+
* If you're working in a TypeScript project, you can generate types from your app's connector configurations to get autocomplete on integration type names when calling `getAccessToken()`. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
|
|
29
38
|
*/
|
|
30
39
|
export interface ConnectorsModule {
|
|
31
40
|
/**
|
|
@@ -97,10 +97,7 @@ export interface EntityTypeRegistry {
|
|
|
97
97
|
*
|
|
98
98
|
* @example
|
|
99
99
|
* ```typescript
|
|
100
|
-
* // Type-safe entity records
|
|
101
100
|
* import type { EntityRecord } from '@base44/sdk';
|
|
102
|
-
* // Import your generated entity schema
|
|
103
|
-
* import type { Task } from '@/base44/.types/types';
|
|
104
101
|
*
|
|
105
102
|
* // Combine your schema with server fields (id, created_date, etc.)
|
|
106
103
|
* type TaskRecord = EntityRecord['Task'];
|
|
@@ -434,7 +431,7 @@ type DynamicEntitiesModule = {
|
|
|
434
431
|
*
|
|
435
432
|
* ## Generated Types
|
|
436
433
|
*
|
|
437
|
-
* If you're working in a TypeScript project, you can generate types from your entity schemas to get autocomplete and type checking on all entity methods. See the [
|
|
434
|
+
* If you're working in a TypeScript project, you can generate types from your entity schemas to get autocomplete and type checking on all entity methods. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
|
|
438
435
|
*
|
|
439
436
|
* @example
|
|
440
437
|
* ```typescript
|
|
@@ -26,7 +26,7 @@ export type FunctionName = keyof FunctionNameRegistry extends never ? string : k
|
|
|
26
26
|
*
|
|
27
27
|
* ## Generated Types
|
|
28
28
|
*
|
|
29
|
-
* If you're working in a TypeScript project, you can generate types from your backend functions to get autocomplete on function names when calling `invoke()`. See the [
|
|
29
|
+
* If you're working in a TypeScript project, you can generate types from your backend functions to get autocomplete on function names when calling `invoke()`. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
|
|
30
30
|
*/
|
|
31
31
|
export interface FunctionsModule {
|
|
32
32
|
/**
|
|
@@ -46,7 +46,6 @@ export interface FunctionsModule {
|
|
|
46
46
|
* // Basic function call
|
|
47
47
|
* const result = await base44.functions.invoke('calculateTotal', {
|
|
48
48
|
* items: ['item1', 'item2'],
|
|
49
|
-
* discount: 0.1
|
|
50
49
|
* });
|
|
51
50
|
* console.log(result.data.total);
|
|
52
51
|
* ```
|