@base44-preview/sdk 0.8.19-pr.127.efac8bd → 0.8.19-pr.129.326a231

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/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { getAccessToken, saveAccessToken, removeAccessToken, getLoginUrl } from
4
4
  export { createClient, createClientFromRequest, Base44Error, getAccessToken, saveAccessToken, removeAccessToken, getLoginUrl, };
5
5
  export type { Base44Client, CreateClientConfig, CreateClientOptions, Base44ErrorJSON, };
6
6
  export * from "./types.js";
7
- export type { DeleteManyResult, DeleteResult, EntitiesModule, EntityHandler, EntityRecord, EntityTypeRegistry, ImportResult, RealtimeEventType, RealtimeEvent, RealtimeCallback, } from "./modules/entities.types.js";
7
+ export type { DeleteManyResult, DeleteResult, EntitiesModule, EntityHandler, EntityRecord, EntityTypeRegistry, ImportResult, RealtimeEventType, RealtimeEvent, RealtimeCallback, SortField, } from "./modules/entities.types.js";
8
8
  export type { AuthModule, LoginResponse, RegisterParams, VerifyOtpParams, ChangePasswordParams, ResetPasswordParams, User, } from "./modules/auth.types.js";
9
9
  export type { IntegrationsModule, IntegrationPackage, IntegrationEndpointFunction, CoreIntegrations, InvokeLLMParams, GenerateImageParams, GenerateImageResult, UploadFileParams, UploadFileResult, SendEmailParams, SendEmailResult, ExtractDataFromUploadedFileParams, ExtractDataFromUploadedFileResult, UploadPrivateFileParams, UploadPrivateFileResult, CreateFileSignedUrlParams, CreateFileSignedUrlResult, } from "./modules/integrations.types.js";
10
10
  export type { FunctionsModule, FunctionName, FunctionNameRegistry, } from "./modules/functions.types.js";
@@ -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 [Generated Types](/developers/references/sdk/getting-started/generated-types) guide to get started.
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
  /**
@@ -179,22 +179,29 @@ export interface AuthModule {
179
179
  * Supported providers:
180
180
  * - `'google'` - {@link https://developers.google.com/identity/protocols/oauth2 | Google OAuth}. Enabled by default.
181
181
  * - `'microsoft'` - {@link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow | Microsoft OAuth}. Enable Microsoft in your app's authentication settings before specifying this provider.
182
- * - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable this in your app's authentication settings before using.
182
+ * - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable Facebook in your app's authentication settings before using.
183
+ * - `'apple'` - {@link https://developer.apple.com/sign-in-with-apple/ | Sign in with Apple}. Enable Apple in your app's authentication settings before using this provider.
183
184
  *
184
- * @param provider - The authentication provider to use: `'google'`, `'microsoft'`, or `'facebook'`.
185
+ * @param provider - The authentication provider to use: `'google'`, `'microsoft'`, `'facebook'`, or `'apple'`.
185
186
  * @param fromUrl - URL to redirect to after successful authentication. Defaults to `'/'`.
186
187
  *
187
188
  * @example
188
189
  * ```typescript
189
- * // Login with Google and return to current page
190
+ * // Google
190
191
  * base44.auth.loginWithProvider('google', window.location.pathname);
191
192
  * ```
192
193
  *
193
194
  * @example
194
195
  * ```typescript
195
- * // Login with Microsoft and redirect to dashboard
196
+ * // Microsoft
196
197
  * base44.auth.loginWithProvider('microsoft', '/dashboard');
197
198
  * ```
199
+ *
200
+ * @example
201
+ * ```typescript
202
+ * // Apple
203
+ * base44.auth.loginWithProvider('apple', '/dashboard');
204
+ * ```
198
205
  */
199
206
  loginWithProvider(provider: string, fromUrl?: string): void;
200
207
  /**
@@ -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
- * The type of external integration/connector, such as `'googlecalendar'`, `'slack'`, or `'github'`.
9
- * Uses registry keys if augmented, otherwise falls back to string.
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
  /**
@@ -55,13 +55,16 @@ export interface ImportResult<T = any> {
55
55
  /**
56
56
  * Sort field type for entity queries.
57
57
  *
58
- * Supports ascending (no prefix or `'+'`) and descending (`'-'`) sorting.
58
+ * Accepts any field name from the entity type with an optional prefix:
59
+ * - `'+'` prefix or no prefix: ascending sort
60
+ * - `'-'` prefix: descending sort
59
61
  *
60
62
  * @typeParam T - The entity type to derive sortable fields from.
61
63
  *
62
64
  * @example
63
65
  * ```typescript
64
- * // Ascending sort (default)
66
+ * // Specify sort direction by prefixing field names with + or -
67
+ * // Ascending sort
65
68
  * 'created_date'
66
69
  * '+created_date'
67
70
  *
@@ -71,7 +74,7 @@ export interface ImportResult<T = any> {
71
74
  */
72
75
  export type SortField<T> = (keyof T & string) | `+${keyof T & string}` | `-${keyof T & string}`;
73
76
  /**
74
- * Fields added by the server to every entity record (id, dates, created_by, etc.).
77
+ * Fields added by the server to every entity record, such as `id`, `created_date`, `updated_date`, and `created_by`.
75
78
  */
76
79
  interface ServerEntityFields {
77
80
  /** Unique identifier of the record */
@@ -97,11 +100,7 @@ export interface EntityTypeRegistry {
97
100
  *
98
101
  * @example
99
102
  * ```typescript
100
- * // Type-safe entity records
101
- * import type { EntityRecord } from '@base44/sdk';
102
- * // Import your generated entity schema
103
- * import type { Task } from '@/base44/.types/types';
104
- *
103
+ * // Using EntityRecord to get the complete type for an entity
105
104
  * // Combine your schema with server fields (id, created_date, etc.)
106
105
  * type TaskRecord = EntityRecord['Task'];
107
106
  *
@@ -434,7 +433,7 @@ type DynamicEntitiesModule = {
434
433
  *
435
434
  * ## Generated Types
436
435
  *
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 [Generated Types](/developers/references/sdk/getting-started/generated-types) guide to get started.
436
+ * 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
437
  *
439
438
  * @example
440
439
  * ```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 [Generated Types](/developers/references/sdk/getting-started/generated-types) guide to get started.
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.19-pr.127.efac8bd",
3
+ "version": "0.8.19-pr.129.326a231",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",