@mitralab.io/sdk-core 0.3.0 → 0.3.2

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.cts CHANGED
@@ -536,6 +536,8 @@ interface AgentMessageListOptions extends PageOptions {
536
536
  * and `TOOL_USE` rows of the chat itself, as before.
537
537
  */
538
538
  kinds?: "all";
539
+ /** Id of a message: only the rows recorded before it, so the next page back holds still. */
540
+ before?: string;
539
541
  }
540
542
  type AppColor = {
541
543
  type: "SOLID";
@@ -1099,8 +1101,8 @@ type AgentTaskInput = {
1099
1101
  reasoningEffort?: string;
1100
1102
  /**
1101
1103
  * With a turn running, as T3's composer: `queue` puts the message in T3's queue behind it and
1102
- * `steer` takes it into the running turn. A box given none lets T3 decide. The Copilot does
1103
- * not take the field.
1104
+ * `steer` takes it into the running turn. A box given none lets T3 decide. The Copilot passes
1105
+ * it to the box and steers a message sent without one.
1104
1106
  */
1105
1107
  mode?: "queue" | "steer";
1106
1108
  /**
@@ -1281,6 +1283,22 @@ interface AgentModel {
1281
1283
  /** Name the person chose for a custom provider; null on built-in models. Absent on an older Copilot. */
1282
1284
  providerName?: string | null;
1283
1285
  }
1286
+ /**
1287
+ * A provider the next turn can run on, with the models the catalog offers on it and the last
1288
+ * subscription reading of the person's login.
1289
+ */
1290
+ interface AgentReadyProvider {
1291
+ provider: CopilotProvider;
1292
+ /** Name the person chose for a custom provider; null on a built-in one. */
1293
+ providerName: string | null;
1294
+ /** The catalog's models of this provider, in the catalog's order. */
1295
+ models: AgentModel[];
1296
+ /**
1297
+ * The same reading `usage(provider)` answers; null on an API key, before a turn reported a
1298
+ * window, on a custom provider, which has no subscription, and when the Copilot could not read it.
1299
+ */
1300
+ usage: CredentialUsage | null;
1301
+ }
1284
1302
  interface CredentialStatus {
1285
1303
  provider: CopilotProvider;
1286
1304
  connected: boolean;
@@ -1401,6 +1419,108 @@ interface SendEmailInput {
1401
1419
  /** Plain-text alternative for clients that do not render HTML. */
1402
1420
  text?: string;
1403
1421
  }
1422
+ /**
1423
+ * The account emails an app may rewrite with its own token. Messenger sends them from the app's
1424
+ * sender settings or the brand, so a template never picks its sender.
1425
+ */
1426
+ type EmailTemplateType = "SIGN_IN" | "SSO_GUIDANCE" | "APP_USER_INVITED" | "APP_ACCESS_REQUIRED";
1427
+ interface EmailTemplate {
1428
+ id: string;
1429
+ /**
1430
+ * An `EmailTemplateType` with an app token. Kept as a string because a console token also
1431
+ * lists the platform's other types, and a type Messenger opens later must not break the list.
1432
+ */
1433
+ type: string;
1434
+ /** Always null for these types: their sender comes from the app settings or the brand. */
1435
+ senderIdentityId: string | null;
1436
+ subject: string;
1437
+ htmlBody: string;
1438
+ textBody: string | null;
1439
+ /** True on a platform row. The list returns it next to the app's own row when the app rewrote the type. */
1440
+ platformDefault: boolean;
1441
+ createdAt: string;
1442
+ updatedAt: string;
1443
+ }
1444
+ interface EmailTemplateVariable {
1445
+ /** Referenced in a template as `$name`. */
1446
+ name: string;
1447
+ /** A required variable must appear in the subject or the HTML body. */
1448
+ required: boolean;
1449
+ description: string | null;
1450
+ /** Sample value used to render the preview. */
1451
+ preview: string | null;
1452
+ }
1453
+ interface EmailTemplateTypeCatalog {
1454
+ type: string;
1455
+ variables: EmailTemplateVariable[];
1456
+ }
1457
+ /** Replaces the app's version of the template as a whole. */
1458
+ interface EmailTemplateInput {
1459
+ subject: string;
1460
+ htmlBody: string;
1461
+ /** Left out, the plain-text version saved before is cleared. */
1462
+ textBody?: string;
1463
+ }
1464
+ /** The template rendered with the preview values of its variables. */
1465
+ interface EmailTemplatePreview {
1466
+ subject: string;
1467
+ htmlBody: string;
1468
+ textBody: string | null;
1469
+ }
1470
+ interface EmailTemplateUpsertResult {
1471
+ template: EmailTemplate;
1472
+ /** Null when only the preview failed; the template is saved all the same. */
1473
+ preview: EmailTemplatePreview | null;
1474
+ /** The transport or response error of the preview, unchanged, when `preview` is null. */
1475
+ previewError?: unknown;
1476
+ }
1477
+ /** An address of a person, available as a sender in the app's workspace. */
1478
+ interface EmailSender {
1479
+ id: string;
1480
+ email: string;
1481
+ displayName: string;
1482
+ /**
1483
+ * `PENDING`, `VERIFIED` or `FAILED`. Kept as a string so a status Messenger adds later does not
1484
+ * break the list. Only a `VERIFIED` address signs the app's emails.
1485
+ */
1486
+ status: string;
1487
+ sharedWithCurrentWorkspace: boolean;
1488
+ /** True until the person confirms the 6-digit code Messenger sent to the address. */
1489
+ ownerConfirmationPending: boolean;
1490
+ createdAt: string;
1491
+ updatedAt: string;
1492
+ }
1493
+ interface EmailSenderInput {
1494
+ email: string;
1495
+ /** Name of the address; the app settings may override it in the From header. */
1496
+ displayName: string;
1497
+ }
1498
+ /** The From the app's emails use now, which falls back to the brand while the app sender cannot sign. */
1499
+ interface EffectiveEmailSender {
1500
+ email: string;
1501
+ displayName: string | null;
1502
+ /** `APP_SENDER` or `BRAND_DEFAULT`, as a string for the same reason as `EmailSender.status`. */
1503
+ source: string;
1504
+ /** Why the brand signs: `NO_SETTINGS`, `IDENTITY_NOT_VERIFIED` or `IDENTITY_NOT_SHARED`. */
1505
+ reason: string | null;
1506
+ }
1507
+ interface EmailSettings {
1508
+ appId: string;
1509
+ senderIdentityId: string | null;
1510
+ displayName: string | null;
1511
+ replyTo: string | null;
1512
+ effectiveSender: EffectiveEmailSender;
1513
+ /** True when the app's own templates go out even while the brand signs. */
1514
+ ownTemplateSendsFromBrand: boolean;
1515
+ }
1516
+ /** Replaces the app's settings as a whole: a field left out or null is cleared. */
1517
+ interface EmailSettingsInput {
1518
+ /** An `EmailSender.id` from `listEmailSenders`; without it the app sends from the brand. */
1519
+ senderIdentityId?: string | null;
1520
+ /** Single line, shown in the From header. */
1521
+ displayName?: string | null;
1522
+ replyTo?: string | null;
1523
+ }
1404
1524
  interface AppContext {
1405
1525
  appId: string;
1406
1526
  app: AppDefinition;
@@ -1461,6 +1581,14 @@ interface AgentCredentialsModule {
1461
1581
  list(options?: AgentCredentialOptions): Promise<CredentialStatus[]>;
1462
1582
  /** Lists models backed by a usable credential, optionally through a business agent connection. */
1463
1583
  listModels(agentId?: string, options?: AgentCredentialOptions): Promise<AgentModel[]>;
1584
+ /**
1585
+ * The providers the next turn can run on, as the Copilot assembles them in one call: one entry
1586
+ * per built-in provider and per custom provider of `listModels(agentId)`, in the catalog's order,
1587
+ * each with its models and, for the built-in ones, the reading `usage(provider)` answers. A
1588
+ * reading the Copilot cannot get comes as null. With an `agentId` the models are the agent
1589
+ * connection's, and the reading is still the person's own login.
1590
+ */
1591
+ providers(agentId?: string, options?: AgentCredentialOptions): Promise<AgentReadyProvider[]>;
1464
1592
  /**
1465
1593
  * The last subscription window a chat on this credential reported, readable with no chat open.
1466
1594
  * Resolves to null until a turn on the provider's subscription login has reported one; an API
@@ -1893,8 +2021,48 @@ interface MessengerModule {
1893
2021
  notify(content: string): Promise<MessageAccepted>;
1894
2022
  /** Sends an email from the app's sender; only the app's backend token may send. */
1895
2023
  sendEmail(input: SendEmailInput): Promise<MessageAccepted>;
1896
- }
1897
- declare function createMessengerModule(transport: Transport, errors?: SdkCoreErrorFactory): MessengerModule;
2024
+ /**
2025
+ * Lists the current app's email templates: the platform row (`platformDefault: true`) of every
2026
+ * type and, beside it, the app's row for each type the app has rewritten.
2027
+ */
2028
+ listEmailTemplates(): Promise<EmailTemplate[]>;
2029
+ /** Gets the variables a type accepts, referenced as `$name` in the subject and HTML body. */
2030
+ getEmailTemplateType(type: EmailTemplateType): Promise<EmailTemplateTypeCatalog>;
2031
+ /** Gets the current app's version of a template, or the platform text when it has none. */
2032
+ getEmailTemplate(type: EmailTemplateType): Promise<EmailTemplate>;
2033
+ /**
2034
+ * Replaces the current app's version of a template and renders its preview. Every required
2035
+ * variable must appear in the subject or the HTML body.
2036
+ */
2037
+ upsertEmailTemplate(type: EmailTemplateType, input: EmailTemplateInput): Promise<EmailTemplateUpsertResult>;
2038
+ /**
2039
+ * Renders the app's saved template, or the platform one, with the catalog's sample values. It
2040
+ * does not prove which HTML goes out: the sender and the brand policy decide that at send time.
2041
+ */
2042
+ previewEmailTemplate(type: EmailTemplateType): Promise<EmailTemplatePreview>;
2043
+ /** Deletes the current app's version of a template, so the platform text applies again. */
2044
+ deleteEmailTemplate(type: EmailTemplateType): Promise<void>;
2045
+ /** Lists the addresses available as senders in the workspace of the token. */
2046
+ listEmailSenders(): Promise<EmailSender[]>;
2047
+ /**
2048
+ * Registers an address in the name of the person in the token and makes it available in the
2049
+ * app's workspace. An address the person already owns comes back as saved, made available too.
2050
+ * Messenger mails a verification link and a 6-digit code to the address.
2051
+ */
2052
+ registerEmailSender(input: EmailSenderInput): Promise<EmailSender>;
2053
+ /**
2054
+ * Mails the AWS link again while AWS has not verified the address, and a new code only while
2055
+ * the person has not confirmed one yet.
2056
+ */
2057
+ resendEmailSenderVerification(senderId: string): Promise<EmailSender>;
2058
+ /** Confirms the 6-digit code the person read in the mailbox of the address. */
2059
+ confirmEmailSender(senderId: string, code: string): Promise<EmailSender>;
2060
+ /** Gets the current app's sender settings and the From its emails use now. */
2061
+ getEmailSettings(): Promise<EmailSettings>;
2062
+ /** Replaces the current app's sender settings; a field left out is cleared. */
2063
+ updateEmailSettings(input: EmailSettingsInput): Promise<EmailSettings>;
2064
+ }
2065
+ declare function createMessengerModule(transport: Transport, errors?: SdkCoreErrorFactory, getAppId?: () => string | undefined): MessengerModule;
1898
2066
 
1899
2067
  interface PublicFunctionsModule {
1900
2068
  /**
@@ -1966,7 +2134,7 @@ interface SdkCoreTransports {
1966
2134
  codeStudio?: Transport;
1967
2135
  /** Copilot transport for tasks, credentials, models, and app connections. */
1968
2136
  copilot?: Transport;
1969
- /** Messenger transport for current-user notifications. */
2137
+ /** Messenger transport for current-user notifications, app emails, and their templates. */
1970
2138
  messenger?: Transport;
1971
2139
  /**
1972
2140
  * Anonymous Functions transport. It must not add Authorization or X-App-Id headers.
@@ -2369,7 +2537,13 @@ interface AgentTaskSessionEventMap {
2369
2537
  raw: AgentTaskEvent;
2370
2538
  }
2371
2539
  /** The same shape `agentCredentials.usage` answers with. */
2372
- type AgentProviderUsage = CredentialUsage;
2540
+ type AgentProviderUsage = CredentialUsage & {
2541
+ /**
2542
+ * The provider the reading is of, as `agentCredentials.providers()` names it in
2543
+ * `AgentReadyProvider.provider`. Absent from a box that does not send it.
2544
+ */
2545
+ provider?: CopilotProvider;
2546
+ };
2373
2547
  interface AgentTaskSession {
2374
2548
  readonly taskId: string | null;
2375
2549
  readonly task: AgentTask | null;
@@ -2398,6 +2572,18 @@ interface AgentTaskSession {
2398
2572
  loadHistory(options?: {
2399
2573
  limit?: number;
2400
2574
  }): Promise<readonly AgentTimelineItem[]>;
2575
+ /**
2576
+ * Whether the Copilot has rows older than the oldest row `history` holds, as the last page read
2577
+ * said. False until a history was loaded.
2578
+ */
2579
+ readonly hasOlder: boolean;
2580
+ /**
2581
+ * Reads the page before the oldest row `history` holds, with the size `loadHistory` used, and
2582
+ * puts it before `history`, in the box's order. Resolves with the items it added (none when
2583
+ * there is nothing older) and emits `historyLoaded`. A read still running when `history` is
2584
+ * replaced resolves with nothing.
2585
+ */
2586
+ loadOlder(): Promise<readonly AgentTimelineItem[]>;
2401
2587
  /** Changes the text of a queued message (T3's `queued-run.edit`); only the box channel takes it. */
2402
2588
  editQueueItem(id: string, text: string): void;
2403
2589
  /** Takes a message out of the queue (T3's `queued-run.cancel`); only the box channel takes it. */
@@ -2492,4 +2678,4 @@ declare function expectPage<T extends object>(value: unknown, context: string, e
2492
2678
  declare function expectLegacyPage<T extends object>(value: unknown, context: string, errors?: SdkCoreErrorFactory, validateItem?: (value: unknown, context: string, errors: SdkCoreErrorFactory) => T): LegacyPage<T>;
2493
2679
  declare function expectEmpty(value: unknown, context: string, errors?: SdkCoreErrorFactory): void;
2494
2680
 
2495
- export { API_KEY_EXCHANGE_PATH, type AgentBackgroundTask, type AgentBulkDeleteResult, type AgentConnection, type AgentConnectionCreateInput, type AgentConnectionCustomProvider, type AgentConnectionCustomProviderInput, type AgentConnectionsModule, type AgentCredentialOptions, type AgentCredentialScope, type AgentCredentialsModule, type AgentDefinition, type AgentDirectChannelOptions, type AgentFetch, type AgentFetchResponse, type AgentHistoryCursor, type AgentInput, type AgentMessage, type AgentMessageListOptions, type AgentModel, type AgentPieceIdentity, type AgentProviderUsage, type AgentQueueItem, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, type AgentSubagent, type AgentSubagentFrame, type AgentSubagentStatus, type AgentTask, type AgentTaskChannel, type AgentTaskCreateInput, type AgentTaskEvent, type AgentTaskEventConnection, type AgentTaskEventObserver, type AgentTaskEventSource, type AgentTaskInput, type AgentTaskListOptions, type AgentTaskRuntime, type AgentTaskSession, type AgentTaskSessionEventMap, type AgentTaskSessionManager, type AgentTaskSessionManagerOptions, type AgentTaskSessionOptions, type AgentTaskSessionStatus, AgentTaskTurnError, type AgentTasksModule, type AgentTasksWithSessions, type AgentTimelineItem, type AgentTimelineItemIdentity, type AgentToolEvent, type AgentTurnResult, type AgentTurnUsage, type AgentTurnUsageRequest, type AgentUpdateItem, type AgentWebSocket, type AgentWebSocketConstructor, type AgentsModule, type ApiKeyExchangeCaller, type AppColor, type AppContext, type AppCreateInput, type AppDefinition, type AppDeploy, type AppDomain, type AppFiles, type AppGetOptions, type AppListOptions, type AppMember, type AppPublishOptions, type AppSummary, type AppUpdateInput, type AppVersion, type AppVersionStatus, type AppsModule, type AuthModule, type AuthenticationResult, type BatchExecution, type BatchStatementResult, type BulkUnsubscribeResult, type ColumnInput, type ConnectionConfig, type ConnectionConfigResponse, type ConnectionTestResult, type ContextModule, type ContextModuleDependencies, type CopilotProvider, type CredentialStatus, type CredentialUsage, type CredentialUsageWindow, type CustomQueriesModule, type CustomQueryDefinition, type CustomQueryInput, type CustomQuerySummary, type CustomQueryUpdateInput, type DataSourceBulkItemResult, type DataSourceBulkResult, type DataSourceCreateInput, type DataSourceDbType, type DataSourceDefinition, type DataSourceInstanceType, type DataSourceUpdateInput, type DataSourcesModule, type DdlStatement, type DeviceAuthorization, type DmlStatement, type EmptyFunctionInput, type EntitiesModule, type EntitiesProxy, type EntityListOptions, type EntityListResponse, type EntityTable, type ExistingAgentTaskSessionOptions, type FunctionBulkCreateInput, type FunctionBulkDeleteInput, type FunctionBulkDeleteResult, type FunctionBulkPatchInput, type FunctionBulkPatchItem, type FunctionBulkUpdateItem, type FunctionCreateInput, type FunctionDefinition, type FunctionExecution, type FunctionListOptions, type FunctionPatchInput, type FunctionRuntime, type FunctionSecrets, type FunctionSummary, type FunctionUpdateInput, type FunctionVersion, type FunctionVersionListOptions, type FunctionVisibility, type FunctionsAdminModule, type FunctionsModule, type FunctionsModuleOptions, type HttpMethod, type ImportColumnMapping, type ImportDefinition, type ImportExecution, type ImportExecutionListOptions, type ImportInput, type ImportProcessing, type ImportSchedule, type ImportSource, type ImportSourceResponse, type ImportTarget, type ImportsModule, type IntegrationAdminModule, type IntegrationConnectionStatus, type IntegrationCredentialRule, type IntegrationExecution, type IntegrationFieldSchema, type IntegrationFieldSchemaInput, type IntegrationLoginConfig, type IntegrationModule, type IntegrationProxyMode, type IntegrationRequestConfig, type IntegrationResource, type IntegrationResourceInput, type IntegrationResourceParam, type IntegrationResourceSummary, type IntegrationResourceUpdateInput, type IntegrationResourcesModule, type IntegrationTemplate, type IntegrationTemplateSummary, type IntegrationTemplateType, type IntegrationTemplatesModule, type IntegrationTokenExtraction, type InviteAppUserInput, type InvocationType, type JsonValue, type LegacyPage, type ListTablesOptions, type ListTemplateConfigsOptions, type MembersModule, type MessageAccepted, type MessengerModule, type NewAgentTaskSessionOptions, type OAuthExchangeInput, type OAuthStartResult, type Page, type PageOptions, type PlanPrice, type ProviderCredentialStatus, type ProxyInput, type ProxyResult, type PublicFunctionAsyncResult, type PublicFunctionResult, type PublicFunctionsModule, type QueriesModule, type QueryParamPrimitive, type QueryParamValue, type QueryResult, type SchemaModule, type SchemaScope, type SchemaTables, type SdkCore, SdkCoreConfigurationError, type SdkCoreErrorFactory, type SdkCoreOptions, SdkCoreResponseError, type SdkCoreTransports, type SendEmailInput, type SqlModule, type TableColumn, type TableDefinition, type TableForeignKey, type TemplateConfig, type TemplateConfigBulkItemResult, type TemplateConfigBulkResult, type TemplateConfigCreateInput, type TemplateConfigPage, type TemplateConfigSummary, type TemplateConfigUpdateInput, type Tenant, type TestCredentialsInput, type Transport, type TransportRequestOptions, type User, type UserPlan, type WorkflowDefinition, type WorkflowExecution, type WorkflowInput, type WorkflowSummary, type WorkflowsModule, appAccessTokenPath, createAgentConnectionsModule, createAgentCredentialsModule, createAgentTaskSessionManager, createAgentTasksModule, createAgentsModule, createAppsModule, createAuthModule, createContextModule, createCustomQueriesModule, createDataSourcesModule, createEntitiesModule, createFunctionsAdminModule, createFunctionsModule, createImportsModule, createIntegrationAdminModule, createIntegrationModule, createIntegrationResourcesModule, createIntegrationTemplatesModule, createMembersModule, createMessengerModule, createPublicFunctionsModule, createQueriesModule, createSchemaModule, createSdkCore, createSqlModule, createWorkflowsModule, defaultSdkCoreErrorFactory, encodePathSegment, expectEmpty, expectLegacyPage, expectNullableObject, expectObject, expectObjectArray, expectPage, expectStringArray, isWorkspaceSession, readTokenAppId, readTokenExpiry, resolveApiKeyToken, toAgentTimelineItem, tokenAuthorizesApp, withAgentTaskSessions };
2681
+ export { API_KEY_EXCHANGE_PATH, type AgentBackgroundTask, type AgentBulkDeleteResult, type AgentConnection, type AgentConnectionCreateInput, type AgentConnectionCustomProvider, type AgentConnectionCustomProviderInput, type AgentConnectionsModule, type AgentCredentialOptions, type AgentCredentialScope, type AgentCredentialsModule, type AgentDefinition, type AgentDirectChannelOptions, type AgentFetch, type AgentFetchResponse, type AgentHistoryCursor, type AgentInput, type AgentMessage, type AgentMessageListOptions, type AgentModel, type AgentPieceIdentity, type AgentProviderUsage, type AgentQueueItem, type AgentReadyProvider, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, type AgentSubagent, type AgentSubagentFrame, type AgentSubagentStatus, type AgentTask, type AgentTaskChannel, type AgentTaskCreateInput, type AgentTaskEvent, type AgentTaskEventConnection, type AgentTaskEventObserver, type AgentTaskEventSource, type AgentTaskInput, type AgentTaskListOptions, type AgentTaskRuntime, type AgentTaskSession, type AgentTaskSessionEventMap, type AgentTaskSessionManager, type AgentTaskSessionManagerOptions, type AgentTaskSessionOptions, type AgentTaskSessionStatus, AgentTaskTurnError, type AgentTasksModule, type AgentTasksWithSessions, type AgentTimelineItem, type AgentTimelineItemIdentity, type AgentToolEvent, type AgentTurnResult, type AgentTurnUsage, type AgentTurnUsageRequest, type AgentUpdateItem, type AgentWebSocket, type AgentWebSocketConstructor, type AgentsModule, type ApiKeyExchangeCaller, type AppColor, type AppContext, type AppCreateInput, type AppDefinition, type AppDeploy, type AppDomain, type AppFiles, type AppGetOptions, type AppListOptions, type AppMember, type AppPublishOptions, type AppSummary, type AppUpdateInput, type AppVersion, type AppVersionStatus, type AppsModule, type AuthModule, type AuthenticationResult, type BatchExecution, type BatchStatementResult, type BulkUnsubscribeResult, type ColumnInput, type ConnectionConfig, type ConnectionConfigResponse, type ConnectionTestResult, type ContextModule, type ContextModuleDependencies, type CopilotProvider, type CredentialStatus, type CredentialUsage, type CredentialUsageWindow, type CustomQueriesModule, type CustomQueryDefinition, type CustomQueryInput, type CustomQuerySummary, type CustomQueryUpdateInput, type DataSourceBulkItemResult, type DataSourceBulkResult, type DataSourceCreateInput, type DataSourceDbType, type DataSourceDefinition, type DataSourceInstanceType, type DataSourceUpdateInput, type DataSourcesModule, type DdlStatement, type DeviceAuthorization, type DmlStatement, type EffectiveEmailSender, type EmailSender, type EmailSenderInput, type EmailSettings, type EmailSettingsInput, type EmailTemplate, type EmailTemplateInput, type EmailTemplatePreview, type EmailTemplateType, type EmailTemplateTypeCatalog, type EmailTemplateUpsertResult, type EmailTemplateVariable, type EmptyFunctionInput, type EntitiesModule, type EntitiesProxy, type EntityListOptions, type EntityListResponse, type EntityTable, type ExistingAgentTaskSessionOptions, type FunctionBulkCreateInput, type FunctionBulkDeleteInput, type FunctionBulkDeleteResult, type FunctionBulkPatchInput, type FunctionBulkPatchItem, type FunctionBulkUpdateItem, type FunctionCreateInput, type FunctionDefinition, type FunctionExecution, type FunctionListOptions, type FunctionPatchInput, type FunctionRuntime, type FunctionSecrets, type FunctionSummary, type FunctionUpdateInput, type FunctionVersion, type FunctionVersionListOptions, type FunctionVisibility, type FunctionsAdminModule, type FunctionsModule, type FunctionsModuleOptions, type HttpMethod, type ImportColumnMapping, type ImportDefinition, type ImportExecution, type ImportExecutionListOptions, type ImportInput, type ImportProcessing, type ImportSchedule, type ImportSource, type ImportSourceResponse, type ImportTarget, type ImportsModule, type IntegrationAdminModule, type IntegrationConnectionStatus, type IntegrationCredentialRule, type IntegrationExecution, type IntegrationFieldSchema, type IntegrationFieldSchemaInput, type IntegrationLoginConfig, type IntegrationModule, type IntegrationProxyMode, type IntegrationRequestConfig, type IntegrationResource, type IntegrationResourceInput, type IntegrationResourceParam, type IntegrationResourceSummary, type IntegrationResourceUpdateInput, type IntegrationResourcesModule, type IntegrationTemplate, type IntegrationTemplateSummary, type IntegrationTemplateType, type IntegrationTemplatesModule, type IntegrationTokenExtraction, type InviteAppUserInput, type InvocationType, type JsonValue, type LegacyPage, type ListTablesOptions, type ListTemplateConfigsOptions, type MembersModule, type MessageAccepted, type MessengerModule, type NewAgentTaskSessionOptions, type OAuthExchangeInput, type OAuthStartResult, type Page, type PageOptions, type PlanPrice, type ProviderCredentialStatus, type ProxyInput, type ProxyResult, type PublicFunctionAsyncResult, type PublicFunctionResult, type PublicFunctionsModule, type QueriesModule, type QueryParamPrimitive, type QueryParamValue, type QueryResult, type SchemaModule, type SchemaScope, type SchemaTables, type SdkCore, SdkCoreConfigurationError, type SdkCoreErrorFactory, type SdkCoreOptions, SdkCoreResponseError, type SdkCoreTransports, type SendEmailInput, type SqlModule, type TableColumn, type TableDefinition, type TableForeignKey, type TemplateConfig, type TemplateConfigBulkItemResult, type TemplateConfigBulkResult, type TemplateConfigCreateInput, type TemplateConfigPage, type TemplateConfigSummary, type TemplateConfigUpdateInput, type Tenant, type TestCredentialsInput, type Transport, type TransportRequestOptions, type User, type UserPlan, type WorkflowDefinition, type WorkflowExecution, type WorkflowInput, type WorkflowSummary, type WorkflowsModule, appAccessTokenPath, createAgentConnectionsModule, createAgentCredentialsModule, createAgentTaskSessionManager, createAgentTasksModule, createAgentsModule, createAppsModule, createAuthModule, createContextModule, createCustomQueriesModule, createDataSourcesModule, createEntitiesModule, createFunctionsAdminModule, createFunctionsModule, createImportsModule, createIntegrationAdminModule, createIntegrationModule, createIntegrationResourcesModule, createIntegrationTemplatesModule, createMembersModule, createMessengerModule, createPublicFunctionsModule, createQueriesModule, createSchemaModule, createSdkCore, createSqlModule, createWorkflowsModule, defaultSdkCoreErrorFactory, encodePathSegment, expectEmpty, expectLegacyPage, expectNullableObject, expectObject, expectObjectArray, expectPage, expectStringArray, isWorkspaceSession, readTokenAppId, readTokenExpiry, resolveApiKeyToken, toAgentTimelineItem, tokenAuthorizesApp, withAgentTaskSessions };
package/dist/index.d.ts CHANGED
@@ -536,6 +536,8 @@ interface AgentMessageListOptions extends PageOptions {
536
536
  * and `TOOL_USE` rows of the chat itself, as before.
537
537
  */
538
538
  kinds?: "all";
539
+ /** Id of a message: only the rows recorded before it, so the next page back holds still. */
540
+ before?: string;
539
541
  }
540
542
  type AppColor = {
541
543
  type: "SOLID";
@@ -1099,8 +1101,8 @@ type AgentTaskInput = {
1099
1101
  reasoningEffort?: string;
1100
1102
  /**
1101
1103
  * With a turn running, as T3's composer: `queue` puts the message in T3's queue behind it and
1102
- * `steer` takes it into the running turn. A box given none lets T3 decide. The Copilot does
1103
- * not take the field.
1104
+ * `steer` takes it into the running turn. A box given none lets T3 decide. The Copilot passes
1105
+ * it to the box and steers a message sent without one.
1104
1106
  */
1105
1107
  mode?: "queue" | "steer";
1106
1108
  /**
@@ -1281,6 +1283,22 @@ interface AgentModel {
1281
1283
  /** Name the person chose for a custom provider; null on built-in models. Absent on an older Copilot. */
1282
1284
  providerName?: string | null;
1283
1285
  }
1286
+ /**
1287
+ * A provider the next turn can run on, with the models the catalog offers on it and the last
1288
+ * subscription reading of the person's login.
1289
+ */
1290
+ interface AgentReadyProvider {
1291
+ provider: CopilotProvider;
1292
+ /** Name the person chose for a custom provider; null on a built-in one. */
1293
+ providerName: string | null;
1294
+ /** The catalog's models of this provider, in the catalog's order. */
1295
+ models: AgentModel[];
1296
+ /**
1297
+ * The same reading `usage(provider)` answers; null on an API key, before a turn reported a
1298
+ * window, on a custom provider, which has no subscription, and when the Copilot could not read it.
1299
+ */
1300
+ usage: CredentialUsage | null;
1301
+ }
1284
1302
  interface CredentialStatus {
1285
1303
  provider: CopilotProvider;
1286
1304
  connected: boolean;
@@ -1401,6 +1419,108 @@ interface SendEmailInput {
1401
1419
  /** Plain-text alternative for clients that do not render HTML. */
1402
1420
  text?: string;
1403
1421
  }
1422
+ /**
1423
+ * The account emails an app may rewrite with its own token. Messenger sends them from the app's
1424
+ * sender settings or the brand, so a template never picks its sender.
1425
+ */
1426
+ type EmailTemplateType = "SIGN_IN" | "SSO_GUIDANCE" | "APP_USER_INVITED" | "APP_ACCESS_REQUIRED";
1427
+ interface EmailTemplate {
1428
+ id: string;
1429
+ /**
1430
+ * An `EmailTemplateType` with an app token. Kept as a string because a console token also
1431
+ * lists the platform's other types, and a type Messenger opens later must not break the list.
1432
+ */
1433
+ type: string;
1434
+ /** Always null for these types: their sender comes from the app settings or the brand. */
1435
+ senderIdentityId: string | null;
1436
+ subject: string;
1437
+ htmlBody: string;
1438
+ textBody: string | null;
1439
+ /** True on a platform row. The list returns it next to the app's own row when the app rewrote the type. */
1440
+ platformDefault: boolean;
1441
+ createdAt: string;
1442
+ updatedAt: string;
1443
+ }
1444
+ interface EmailTemplateVariable {
1445
+ /** Referenced in a template as `$name`. */
1446
+ name: string;
1447
+ /** A required variable must appear in the subject or the HTML body. */
1448
+ required: boolean;
1449
+ description: string | null;
1450
+ /** Sample value used to render the preview. */
1451
+ preview: string | null;
1452
+ }
1453
+ interface EmailTemplateTypeCatalog {
1454
+ type: string;
1455
+ variables: EmailTemplateVariable[];
1456
+ }
1457
+ /** Replaces the app's version of the template as a whole. */
1458
+ interface EmailTemplateInput {
1459
+ subject: string;
1460
+ htmlBody: string;
1461
+ /** Left out, the plain-text version saved before is cleared. */
1462
+ textBody?: string;
1463
+ }
1464
+ /** The template rendered with the preview values of its variables. */
1465
+ interface EmailTemplatePreview {
1466
+ subject: string;
1467
+ htmlBody: string;
1468
+ textBody: string | null;
1469
+ }
1470
+ interface EmailTemplateUpsertResult {
1471
+ template: EmailTemplate;
1472
+ /** Null when only the preview failed; the template is saved all the same. */
1473
+ preview: EmailTemplatePreview | null;
1474
+ /** The transport or response error of the preview, unchanged, when `preview` is null. */
1475
+ previewError?: unknown;
1476
+ }
1477
+ /** An address of a person, available as a sender in the app's workspace. */
1478
+ interface EmailSender {
1479
+ id: string;
1480
+ email: string;
1481
+ displayName: string;
1482
+ /**
1483
+ * `PENDING`, `VERIFIED` or `FAILED`. Kept as a string so a status Messenger adds later does not
1484
+ * break the list. Only a `VERIFIED` address signs the app's emails.
1485
+ */
1486
+ status: string;
1487
+ sharedWithCurrentWorkspace: boolean;
1488
+ /** True until the person confirms the 6-digit code Messenger sent to the address. */
1489
+ ownerConfirmationPending: boolean;
1490
+ createdAt: string;
1491
+ updatedAt: string;
1492
+ }
1493
+ interface EmailSenderInput {
1494
+ email: string;
1495
+ /** Name of the address; the app settings may override it in the From header. */
1496
+ displayName: string;
1497
+ }
1498
+ /** The From the app's emails use now, which falls back to the brand while the app sender cannot sign. */
1499
+ interface EffectiveEmailSender {
1500
+ email: string;
1501
+ displayName: string | null;
1502
+ /** `APP_SENDER` or `BRAND_DEFAULT`, as a string for the same reason as `EmailSender.status`. */
1503
+ source: string;
1504
+ /** Why the brand signs: `NO_SETTINGS`, `IDENTITY_NOT_VERIFIED` or `IDENTITY_NOT_SHARED`. */
1505
+ reason: string | null;
1506
+ }
1507
+ interface EmailSettings {
1508
+ appId: string;
1509
+ senderIdentityId: string | null;
1510
+ displayName: string | null;
1511
+ replyTo: string | null;
1512
+ effectiveSender: EffectiveEmailSender;
1513
+ /** True when the app's own templates go out even while the brand signs. */
1514
+ ownTemplateSendsFromBrand: boolean;
1515
+ }
1516
+ /** Replaces the app's settings as a whole: a field left out or null is cleared. */
1517
+ interface EmailSettingsInput {
1518
+ /** An `EmailSender.id` from `listEmailSenders`; without it the app sends from the brand. */
1519
+ senderIdentityId?: string | null;
1520
+ /** Single line, shown in the From header. */
1521
+ displayName?: string | null;
1522
+ replyTo?: string | null;
1523
+ }
1404
1524
  interface AppContext {
1405
1525
  appId: string;
1406
1526
  app: AppDefinition;
@@ -1461,6 +1581,14 @@ interface AgentCredentialsModule {
1461
1581
  list(options?: AgentCredentialOptions): Promise<CredentialStatus[]>;
1462
1582
  /** Lists models backed by a usable credential, optionally through a business agent connection. */
1463
1583
  listModels(agentId?: string, options?: AgentCredentialOptions): Promise<AgentModel[]>;
1584
+ /**
1585
+ * The providers the next turn can run on, as the Copilot assembles them in one call: one entry
1586
+ * per built-in provider and per custom provider of `listModels(agentId)`, in the catalog's order,
1587
+ * each with its models and, for the built-in ones, the reading `usage(provider)` answers. A
1588
+ * reading the Copilot cannot get comes as null. With an `agentId` the models are the agent
1589
+ * connection's, and the reading is still the person's own login.
1590
+ */
1591
+ providers(agentId?: string, options?: AgentCredentialOptions): Promise<AgentReadyProvider[]>;
1464
1592
  /**
1465
1593
  * The last subscription window a chat on this credential reported, readable with no chat open.
1466
1594
  * Resolves to null until a turn on the provider's subscription login has reported one; an API
@@ -1893,8 +2021,48 @@ interface MessengerModule {
1893
2021
  notify(content: string): Promise<MessageAccepted>;
1894
2022
  /** Sends an email from the app's sender; only the app's backend token may send. */
1895
2023
  sendEmail(input: SendEmailInput): Promise<MessageAccepted>;
1896
- }
1897
- declare function createMessengerModule(transport: Transport, errors?: SdkCoreErrorFactory): MessengerModule;
2024
+ /**
2025
+ * Lists the current app's email templates: the platform row (`platformDefault: true`) of every
2026
+ * type and, beside it, the app's row for each type the app has rewritten.
2027
+ */
2028
+ listEmailTemplates(): Promise<EmailTemplate[]>;
2029
+ /** Gets the variables a type accepts, referenced as `$name` in the subject and HTML body. */
2030
+ getEmailTemplateType(type: EmailTemplateType): Promise<EmailTemplateTypeCatalog>;
2031
+ /** Gets the current app's version of a template, or the platform text when it has none. */
2032
+ getEmailTemplate(type: EmailTemplateType): Promise<EmailTemplate>;
2033
+ /**
2034
+ * Replaces the current app's version of a template and renders its preview. Every required
2035
+ * variable must appear in the subject or the HTML body.
2036
+ */
2037
+ upsertEmailTemplate(type: EmailTemplateType, input: EmailTemplateInput): Promise<EmailTemplateUpsertResult>;
2038
+ /**
2039
+ * Renders the app's saved template, or the platform one, with the catalog's sample values. It
2040
+ * does not prove which HTML goes out: the sender and the brand policy decide that at send time.
2041
+ */
2042
+ previewEmailTemplate(type: EmailTemplateType): Promise<EmailTemplatePreview>;
2043
+ /** Deletes the current app's version of a template, so the platform text applies again. */
2044
+ deleteEmailTemplate(type: EmailTemplateType): Promise<void>;
2045
+ /** Lists the addresses available as senders in the workspace of the token. */
2046
+ listEmailSenders(): Promise<EmailSender[]>;
2047
+ /**
2048
+ * Registers an address in the name of the person in the token and makes it available in the
2049
+ * app's workspace. An address the person already owns comes back as saved, made available too.
2050
+ * Messenger mails a verification link and a 6-digit code to the address.
2051
+ */
2052
+ registerEmailSender(input: EmailSenderInput): Promise<EmailSender>;
2053
+ /**
2054
+ * Mails the AWS link again while AWS has not verified the address, and a new code only while
2055
+ * the person has not confirmed one yet.
2056
+ */
2057
+ resendEmailSenderVerification(senderId: string): Promise<EmailSender>;
2058
+ /** Confirms the 6-digit code the person read in the mailbox of the address. */
2059
+ confirmEmailSender(senderId: string, code: string): Promise<EmailSender>;
2060
+ /** Gets the current app's sender settings and the From its emails use now. */
2061
+ getEmailSettings(): Promise<EmailSettings>;
2062
+ /** Replaces the current app's sender settings; a field left out is cleared. */
2063
+ updateEmailSettings(input: EmailSettingsInput): Promise<EmailSettings>;
2064
+ }
2065
+ declare function createMessengerModule(transport: Transport, errors?: SdkCoreErrorFactory, getAppId?: () => string | undefined): MessengerModule;
1898
2066
 
1899
2067
  interface PublicFunctionsModule {
1900
2068
  /**
@@ -1966,7 +2134,7 @@ interface SdkCoreTransports {
1966
2134
  codeStudio?: Transport;
1967
2135
  /** Copilot transport for tasks, credentials, models, and app connections. */
1968
2136
  copilot?: Transport;
1969
- /** Messenger transport for current-user notifications. */
2137
+ /** Messenger transport for current-user notifications, app emails, and their templates. */
1970
2138
  messenger?: Transport;
1971
2139
  /**
1972
2140
  * Anonymous Functions transport. It must not add Authorization or X-App-Id headers.
@@ -2369,7 +2537,13 @@ interface AgentTaskSessionEventMap {
2369
2537
  raw: AgentTaskEvent;
2370
2538
  }
2371
2539
  /** The same shape `agentCredentials.usage` answers with. */
2372
- type AgentProviderUsage = CredentialUsage;
2540
+ type AgentProviderUsage = CredentialUsage & {
2541
+ /**
2542
+ * The provider the reading is of, as `agentCredentials.providers()` names it in
2543
+ * `AgentReadyProvider.provider`. Absent from a box that does not send it.
2544
+ */
2545
+ provider?: CopilotProvider;
2546
+ };
2373
2547
  interface AgentTaskSession {
2374
2548
  readonly taskId: string | null;
2375
2549
  readonly task: AgentTask | null;
@@ -2398,6 +2572,18 @@ interface AgentTaskSession {
2398
2572
  loadHistory(options?: {
2399
2573
  limit?: number;
2400
2574
  }): Promise<readonly AgentTimelineItem[]>;
2575
+ /**
2576
+ * Whether the Copilot has rows older than the oldest row `history` holds, as the last page read
2577
+ * said. False until a history was loaded.
2578
+ */
2579
+ readonly hasOlder: boolean;
2580
+ /**
2581
+ * Reads the page before the oldest row `history` holds, with the size `loadHistory` used, and
2582
+ * puts it before `history`, in the box's order. Resolves with the items it added (none when
2583
+ * there is nothing older) and emits `historyLoaded`. A read still running when `history` is
2584
+ * replaced resolves with nothing.
2585
+ */
2586
+ loadOlder(): Promise<readonly AgentTimelineItem[]>;
2401
2587
  /** Changes the text of a queued message (T3's `queued-run.edit`); only the box channel takes it. */
2402
2588
  editQueueItem(id: string, text: string): void;
2403
2589
  /** Takes a message out of the queue (T3's `queued-run.cancel`); only the box channel takes it. */
@@ -2492,4 +2678,4 @@ declare function expectPage<T extends object>(value: unknown, context: string, e
2492
2678
  declare function expectLegacyPage<T extends object>(value: unknown, context: string, errors?: SdkCoreErrorFactory, validateItem?: (value: unknown, context: string, errors: SdkCoreErrorFactory) => T): LegacyPage<T>;
2493
2679
  declare function expectEmpty(value: unknown, context: string, errors?: SdkCoreErrorFactory): void;
2494
2680
 
2495
- export { API_KEY_EXCHANGE_PATH, type AgentBackgroundTask, type AgentBulkDeleteResult, type AgentConnection, type AgentConnectionCreateInput, type AgentConnectionCustomProvider, type AgentConnectionCustomProviderInput, type AgentConnectionsModule, type AgentCredentialOptions, type AgentCredentialScope, type AgentCredentialsModule, type AgentDefinition, type AgentDirectChannelOptions, type AgentFetch, type AgentFetchResponse, type AgentHistoryCursor, type AgentInput, type AgentMessage, type AgentMessageListOptions, type AgentModel, type AgentPieceIdentity, type AgentProviderUsage, type AgentQueueItem, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, type AgentSubagent, type AgentSubagentFrame, type AgentSubagentStatus, type AgentTask, type AgentTaskChannel, type AgentTaskCreateInput, type AgentTaskEvent, type AgentTaskEventConnection, type AgentTaskEventObserver, type AgentTaskEventSource, type AgentTaskInput, type AgentTaskListOptions, type AgentTaskRuntime, type AgentTaskSession, type AgentTaskSessionEventMap, type AgentTaskSessionManager, type AgentTaskSessionManagerOptions, type AgentTaskSessionOptions, type AgentTaskSessionStatus, AgentTaskTurnError, type AgentTasksModule, type AgentTasksWithSessions, type AgentTimelineItem, type AgentTimelineItemIdentity, type AgentToolEvent, type AgentTurnResult, type AgentTurnUsage, type AgentTurnUsageRequest, type AgentUpdateItem, type AgentWebSocket, type AgentWebSocketConstructor, type AgentsModule, type ApiKeyExchangeCaller, type AppColor, type AppContext, type AppCreateInput, type AppDefinition, type AppDeploy, type AppDomain, type AppFiles, type AppGetOptions, type AppListOptions, type AppMember, type AppPublishOptions, type AppSummary, type AppUpdateInput, type AppVersion, type AppVersionStatus, type AppsModule, type AuthModule, type AuthenticationResult, type BatchExecution, type BatchStatementResult, type BulkUnsubscribeResult, type ColumnInput, type ConnectionConfig, type ConnectionConfigResponse, type ConnectionTestResult, type ContextModule, type ContextModuleDependencies, type CopilotProvider, type CredentialStatus, type CredentialUsage, type CredentialUsageWindow, type CustomQueriesModule, type CustomQueryDefinition, type CustomQueryInput, type CustomQuerySummary, type CustomQueryUpdateInput, type DataSourceBulkItemResult, type DataSourceBulkResult, type DataSourceCreateInput, type DataSourceDbType, type DataSourceDefinition, type DataSourceInstanceType, type DataSourceUpdateInput, type DataSourcesModule, type DdlStatement, type DeviceAuthorization, type DmlStatement, type EmptyFunctionInput, type EntitiesModule, type EntitiesProxy, type EntityListOptions, type EntityListResponse, type EntityTable, type ExistingAgentTaskSessionOptions, type FunctionBulkCreateInput, type FunctionBulkDeleteInput, type FunctionBulkDeleteResult, type FunctionBulkPatchInput, type FunctionBulkPatchItem, type FunctionBulkUpdateItem, type FunctionCreateInput, type FunctionDefinition, type FunctionExecution, type FunctionListOptions, type FunctionPatchInput, type FunctionRuntime, type FunctionSecrets, type FunctionSummary, type FunctionUpdateInput, type FunctionVersion, type FunctionVersionListOptions, type FunctionVisibility, type FunctionsAdminModule, type FunctionsModule, type FunctionsModuleOptions, type HttpMethod, type ImportColumnMapping, type ImportDefinition, type ImportExecution, type ImportExecutionListOptions, type ImportInput, type ImportProcessing, type ImportSchedule, type ImportSource, type ImportSourceResponse, type ImportTarget, type ImportsModule, type IntegrationAdminModule, type IntegrationConnectionStatus, type IntegrationCredentialRule, type IntegrationExecution, type IntegrationFieldSchema, type IntegrationFieldSchemaInput, type IntegrationLoginConfig, type IntegrationModule, type IntegrationProxyMode, type IntegrationRequestConfig, type IntegrationResource, type IntegrationResourceInput, type IntegrationResourceParam, type IntegrationResourceSummary, type IntegrationResourceUpdateInput, type IntegrationResourcesModule, type IntegrationTemplate, type IntegrationTemplateSummary, type IntegrationTemplateType, type IntegrationTemplatesModule, type IntegrationTokenExtraction, type InviteAppUserInput, type InvocationType, type JsonValue, type LegacyPage, type ListTablesOptions, type ListTemplateConfigsOptions, type MembersModule, type MessageAccepted, type MessengerModule, type NewAgentTaskSessionOptions, type OAuthExchangeInput, type OAuthStartResult, type Page, type PageOptions, type PlanPrice, type ProviderCredentialStatus, type ProxyInput, type ProxyResult, type PublicFunctionAsyncResult, type PublicFunctionResult, type PublicFunctionsModule, type QueriesModule, type QueryParamPrimitive, type QueryParamValue, type QueryResult, type SchemaModule, type SchemaScope, type SchemaTables, type SdkCore, SdkCoreConfigurationError, type SdkCoreErrorFactory, type SdkCoreOptions, SdkCoreResponseError, type SdkCoreTransports, type SendEmailInput, type SqlModule, type TableColumn, type TableDefinition, type TableForeignKey, type TemplateConfig, type TemplateConfigBulkItemResult, type TemplateConfigBulkResult, type TemplateConfigCreateInput, type TemplateConfigPage, type TemplateConfigSummary, type TemplateConfigUpdateInput, type Tenant, type TestCredentialsInput, type Transport, type TransportRequestOptions, type User, type UserPlan, type WorkflowDefinition, type WorkflowExecution, type WorkflowInput, type WorkflowSummary, type WorkflowsModule, appAccessTokenPath, createAgentConnectionsModule, createAgentCredentialsModule, createAgentTaskSessionManager, createAgentTasksModule, createAgentsModule, createAppsModule, createAuthModule, createContextModule, createCustomQueriesModule, createDataSourcesModule, createEntitiesModule, createFunctionsAdminModule, createFunctionsModule, createImportsModule, createIntegrationAdminModule, createIntegrationModule, createIntegrationResourcesModule, createIntegrationTemplatesModule, createMembersModule, createMessengerModule, createPublicFunctionsModule, createQueriesModule, createSchemaModule, createSdkCore, createSqlModule, createWorkflowsModule, defaultSdkCoreErrorFactory, encodePathSegment, expectEmpty, expectLegacyPage, expectNullableObject, expectObject, expectObjectArray, expectPage, expectStringArray, isWorkspaceSession, readTokenAppId, readTokenExpiry, resolveApiKeyToken, toAgentTimelineItem, tokenAuthorizesApp, withAgentTaskSessions };
2681
+ export { API_KEY_EXCHANGE_PATH, type AgentBackgroundTask, type AgentBulkDeleteResult, type AgentConnection, type AgentConnectionCreateInput, type AgentConnectionCustomProvider, type AgentConnectionCustomProviderInput, type AgentConnectionsModule, type AgentCredentialOptions, type AgentCredentialScope, type AgentCredentialsModule, type AgentDefinition, type AgentDirectChannelOptions, type AgentFetch, type AgentFetchResponse, type AgentHistoryCursor, type AgentInput, type AgentMessage, type AgentMessageListOptions, type AgentModel, type AgentPieceIdentity, type AgentProviderUsage, type AgentQueueItem, type AgentReadyProvider, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, type AgentSubagent, type AgentSubagentFrame, type AgentSubagentStatus, type AgentTask, type AgentTaskChannel, type AgentTaskCreateInput, type AgentTaskEvent, type AgentTaskEventConnection, type AgentTaskEventObserver, type AgentTaskEventSource, type AgentTaskInput, type AgentTaskListOptions, type AgentTaskRuntime, type AgentTaskSession, type AgentTaskSessionEventMap, type AgentTaskSessionManager, type AgentTaskSessionManagerOptions, type AgentTaskSessionOptions, type AgentTaskSessionStatus, AgentTaskTurnError, type AgentTasksModule, type AgentTasksWithSessions, type AgentTimelineItem, type AgentTimelineItemIdentity, type AgentToolEvent, type AgentTurnResult, type AgentTurnUsage, type AgentTurnUsageRequest, type AgentUpdateItem, type AgentWebSocket, type AgentWebSocketConstructor, type AgentsModule, type ApiKeyExchangeCaller, type AppColor, type AppContext, type AppCreateInput, type AppDefinition, type AppDeploy, type AppDomain, type AppFiles, type AppGetOptions, type AppListOptions, type AppMember, type AppPublishOptions, type AppSummary, type AppUpdateInput, type AppVersion, type AppVersionStatus, type AppsModule, type AuthModule, type AuthenticationResult, type BatchExecution, type BatchStatementResult, type BulkUnsubscribeResult, type ColumnInput, type ConnectionConfig, type ConnectionConfigResponse, type ConnectionTestResult, type ContextModule, type ContextModuleDependencies, type CopilotProvider, type CredentialStatus, type CredentialUsage, type CredentialUsageWindow, type CustomQueriesModule, type CustomQueryDefinition, type CustomQueryInput, type CustomQuerySummary, type CustomQueryUpdateInput, type DataSourceBulkItemResult, type DataSourceBulkResult, type DataSourceCreateInput, type DataSourceDbType, type DataSourceDefinition, type DataSourceInstanceType, type DataSourceUpdateInput, type DataSourcesModule, type DdlStatement, type DeviceAuthorization, type DmlStatement, type EffectiveEmailSender, type EmailSender, type EmailSenderInput, type EmailSettings, type EmailSettingsInput, type EmailTemplate, type EmailTemplateInput, type EmailTemplatePreview, type EmailTemplateType, type EmailTemplateTypeCatalog, type EmailTemplateUpsertResult, type EmailTemplateVariable, type EmptyFunctionInput, type EntitiesModule, type EntitiesProxy, type EntityListOptions, type EntityListResponse, type EntityTable, type ExistingAgentTaskSessionOptions, type FunctionBulkCreateInput, type FunctionBulkDeleteInput, type FunctionBulkDeleteResult, type FunctionBulkPatchInput, type FunctionBulkPatchItem, type FunctionBulkUpdateItem, type FunctionCreateInput, type FunctionDefinition, type FunctionExecution, type FunctionListOptions, type FunctionPatchInput, type FunctionRuntime, type FunctionSecrets, type FunctionSummary, type FunctionUpdateInput, type FunctionVersion, type FunctionVersionListOptions, type FunctionVisibility, type FunctionsAdminModule, type FunctionsModule, type FunctionsModuleOptions, type HttpMethod, type ImportColumnMapping, type ImportDefinition, type ImportExecution, type ImportExecutionListOptions, type ImportInput, type ImportProcessing, type ImportSchedule, type ImportSource, type ImportSourceResponse, type ImportTarget, type ImportsModule, type IntegrationAdminModule, type IntegrationConnectionStatus, type IntegrationCredentialRule, type IntegrationExecution, type IntegrationFieldSchema, type IntegrationFieldSchemaInput, type IntegrationLoginConfig, type IntegrationModule, type IntegrationProxyMode, type IntegrationRequestConfig, type IntegrationResource, type IntegrationResourceInput, type IntegrationResourceParam, type IntegrationResourceSummary, type IntegrationResourceUpdateInput, type IntegrationResourcesModule, type IntegrationTemplate, type IntegrationTemplateSummary, type IntegrationTemplateType, type IntegrationTemplatesModule, type IntegrationTokenExtraction, type InviteAppUserInput, type InvocationType, type JsonValue, type LegacyPage, type ListTablesOptions, type ListTemplateConfigsOptions, type MembersModule, type MessageAccepted, type MessengerModule, type NewAgentTaskSessionOptions, type OAuthExchangeInput, type OAuthStartResult, type Page, type PageOptions, type PlanPrice, type ProviderCredentialStatus, type ProxyInput, type ProxyResult, type PublicFunctionAsyncResult, type PublicFunctionResult, type PublicFunctionsModule, type QueriesModule, type QueryParamPrimitive, type QueryParamValue, type QueryResult, type SchemaModule, type SchemaScope, type SchemaTables, type SdkCore, SdkCoreConfigurationError, type SdkCoreErrorFactory, type SdkCoreOptions, SdkCoreResponseError, type SdkCoreTransports, type SendEmailInput, type SqlModule, type TableColumn, type TableDefinition, type TableForeignKey, type TemplateConfig, type TemplateConfigBulkItemResult, type TemplateConfigBulkResult, type TemplateConfigCreateInput, type TemplateConfigPage, type TemplateConfigSummary, type TemplateConfigUpdateInput, type Tenant, type TestCredentialsInput, type Transport, type TransportRequestOptions, type User, type UserPlan, type WorkflowDefinition, type WorkflowExecution, type WorkflowInput, type WorkflowSummary, type WorkflowsModule, appAccessTokenPath, createAgentConnectionsModule, createAgentCredentialsModule, createAgentTaskSessionManager, createAgentTasksModule, createAgentsModule, createAppsModule, createAuthModule, createContextModule, createCustomQueriesModule, createDataSourcesModule, createEntitiesModule, createFunctionsAdminModule, createFunctionsModule, createImportsModule, createIntegrationAdminModule, createIntegrationModule, createIntegrationResourcesModule, createIntegrationTemplatesModule, createMembersModule, createMessengerModule, createPublicFunctionsModule, createQueriesModule, createSchemaModule, createSdkCore, createSqlModule, createWorkflowsModule, defaultSdkCoreErrorFactory, encodePathSegment, expectEmpty, expectLegacyPage, expectNullableObject, expectObject, expectObjectArray, expectPage, expectStringArray, isWorkspaceSession, readTokenAppId, readTokenExpiry, resolveApiKeyToken, toAgentTimelineItem, tokenAuthorizesApp, withAgentTaskSessions };