@mitralab.io/sdk-core 0.2.16-beta.0 → 0.2.17-beta.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/CHANGELOG.md +21 -0
- package/README.md +2 -1
- package/contracts/README.md +5 -0
- package/contracts/manifest.json +6 -1
- package/contracts/v0.2.17-beta.0/sdk-parity.json +2902 -0
- package/dist/index.cjs +17 -0
- package/dist/index.d.cts +52 -2
- package/dist/index.d.ts +52 -2
- package/dist/index.js +17 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -502,6 +502,14 @@ function expectAppSummary(value, context, errors = defaultSdkCoreErrorFactory) {
|
|
|
502
502
|
if (typeof app.tenantId !== "string") invalidField(context, "tenantId", errors);
|
|
503
503
|
return app;
|
|
504
504
|
}
|
|
505
|
+
var LOGIN_THEME_FIELDS = [
|
|
506
|
+
"logoUrl",
|
|
507
|
+
"backgroundColor",
|
|
508
|
+
"colorScheme",
|
|
509
|
+
"title",
|
|
510
|
+
"subtitle",
|
|
511
|
+
"language"
|
|
512
|
+
];
|
|
505
513
|
function expectAppFields(app, context, errors) {
|
|
506
514
|
for (const field of ["id", "shortId", "subdomain", "brand", "name", "planId"]) {
|
|
507
515
|
if (typeof app[field] !== "string") invalidField(context, field, errors);
|
|
@@ -514,6 +522,15 @@ function expectAppFields(app, context, errors) {
|
|
|
514
522
|
for (const field of ["emailLoginEnabled", "passwordLoginEnabled"]) {
|
|
515
523
|
if (field in app && typeof app[field] !== "boolean") invalidField(context, field, errors);
|
|
516
524
|
}
|
|
525
|
+
if ("passwordLoginMode" in app && typeof app.passwordLoginMode !== "string") {
|
|
526
|
+
invalidField(context, "passwordLoginMode", errors);
|
|
527
|
+
}
|
|
528
|
+
if ("loginTheme" in app && app.loginTheme !== null) {
|
|
529
|
+
const theme = expectObject(app.loginTheme, `${context} loginTheme`, errors);
|
|
530
|
+
for (const field of LOGIN_THEME_FIELDS) {
|
|
531
|
+
if (!isNullableString(theme[field])) invalidField(`${context} loginTheme`, field, errors);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
517
534
|
if (typeof app.externalAccessEnabled !== "boolean") {
|
|
518
535
|
invalidField(context, "externalAccessEnabled", errors);
|
|
519
536
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -596,6 +596,42 @@ interface AppUpdateInput {
|
|
|
596
596
|
* rejects `true` while the app inherits the platform login.
|
|
597
597
|
*/
|
|
598
598
|
passwordLoginEnabled?: boolean;
|
|
599
|
+
/**
|
|
600
|
+
* Where users type the password. Omission preserves the current value. Code Studio rejects
|
|
601
|
+
* `APP_FORM` unless password login is on, in this update or already saved, and turning password
|
|
602
|
+
* login off sets the mode back to `POPUP`.
|
|
603
|
+
*/
|
|
604
|
+
passwordLoginMode?: PasswordLoginMode;
|
|
605
|
+
/**
|
|
606
|
+
* Replaces the login theme whole: a field left out is cleared. `null`, or a theme without any
|
|
607
|
+
* field, clears it, and omission preserves it. A field set to `undefined` drops out of the JSON,
|
|
608
|
+
* so a theme whose fields are all `undefined` clears it too. Code Studio rejects a key it does not
|
|
609
|
+
* know, so a misspelled field cannot wipe the theme.
|
|
610
|
+
*/
|
|
611
|
+
loginTheme?: Partial<AppLoginTheme> | null;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Where an app user types the password. `POPUP` keeps it on the Mitra origin; `APP_FORM` lets the
|
|
615
|
+
* app draw its own form, so the password passes through app code.
|
|
616
|
+
*/
|
|
617
|
+
type PasswordLoginMode = "POPUP" | "APP_FORM";
|
|
618
|
+
/**
|
|
619
|
+
* Theme the Mitra password popup applies. A null or blank field falls back to the app name and the
|
|
620
|
+
* brand defaults. Code Studio checks the rules and rejects a value outside them.
|
|
621
|
+
*/
|
|
622
|
+
interface AppLoginTheme {
|
|
623
|
+
/** An https URL with a host, at most 2048 characters. */
|
|
624
|
+
logoUrl: string | null;
|
|
625
|
+
/** `#rgb` or `#rrggbb`. */
|
|
626
|
+
backgroundColor: string | null;
|
|
627
|
+
/** `light`, `dark` or `system`. */
|
|
628
|
+
colorScheme: string | null;
|
|
629
|
+
/** Plain text without `<`, `>` or control characters, at most 80 characters. */
|
|
630
|
+
title: string | null;
|
|
631
|
+
/** Plain text without `<`, `>` or control characters, at most 160 characters. */
|
|
632
|
+
subtitle: string | null;
|
|
633
|
+
/** `auto`, `pt-BR` or `en`. */
|
|
634
|
+
language: string | null;
|
|
599
635
|
}
|
|
600
636
|
interface AppDomain {
|
|
601
637
|
hostname: string;
|
|
@@ -621,6 +657,13 @@ interface AppSummary {
|
|
|
621
657
|
emailLoginEnabled?: boolean;
|
|
622
658
|
/** Absent on a Code Studio that predates password login. */
|
|
623
659
|
passwordLoginEnabled?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* `POPUP` or `APP_FORM`, as a string so a mode Code Studio adds later does not break the read.
|
|
662
|
+
* Absent on a Code Studio that predates the password login mode.
|
|
663
|
+
*/
|
|
664
|
+
passwordLoginMode?: string;
|
|
665
|
+
/** Null when the app has no theme. Absent on a Code Studio that predates the login theme. */
|
|
666
|
+
loginTheme?: AppLoginTheme | null;
|
|
624
667
|
externalAccessEnabled: boolean;
|
|
625
668
|
currentVersion: AppVersion | null;
|
|
626
669
|
createdAt: string;
|
|
@@ -645,6 +688,13 @@ interface AppDefinition {
|
|
|
645
688
|
emailLoginEnabled?: boolean;
|
|
646
689
|
/** Absent on a Code Studio that predates password login. */
|
|
647
690
|
passwordLoginEnabled?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* `POPUP` or `APP_FORM`, as a string so a mode Code Studio adds later does not break the read.
|
|
693
|
+
* Absent on a Code Studio that predates the password login mode.
|
|
694
|
+
*/
|
|
695
|
+
passwordLoginMode?: string;
|
|
696
|
+
/** Null when the app has no theme. Absent on a Code Studio that predates the login theme. */
|
|
697
|
+
loginTheme?: AppLoginTheme | null;
|
|
648
698
|
externalAccessEnabled: boolean;
|
|
649
699
|
currentVersion: AppVersion | null;
|
|
650
700
|
createdAt: string;
|
|
@@ -1307,7 +1357,7 @@ interface SendEmailInput {
|
|
|
1307
1357
|
* The account emails an app may rewrite with its own token. Messenger sends them from the app's
|
|
1308
1358
|
* sender settings or the brand, so a template never picks its sender.
|
|
1309
1359
|
*/
|
|
1310
|
-
type EmailTemplateType = "SIGN_IN" | "SSO_GUIDANCE" | "APP_USER_INVITED" | "APP_ACCESS_REQUIRED";
|
|
1360
|
+
type EmailTemplateType = "SIGN_IN" | "SSO_GUIDANCE" | "APP_USER_INVITED" | "APP_ACCESS_REQUIRED" | "PASSWORD_RESET" | "PASSWORD_CHANGED" | "ACCOUNT_LOCKED";
|
|
1311
1361
|
interface EmailTemplate {
|
|
1312
1362
|
id: string;
|
|
1313
1363
|
/**
|
|
@@ -2330,4 +2380,4 @@ declare function expectPage<T extends object>(value: unknown, context: string, e
|
|
|
2330
2380
|
declare function expectLegacyPage<T extends object>(value: unknown, context: string, errors?: SdkCoreErrorFactory, validateItem?: (value: unknown, context: string, errors: SdkCoreErrorFactory) => T): LegacyPage<T>;
|
|
2331
2381
|
declare function expectEmpty(value: unknown, context: string, errors?: SdkCoreErrorFactory): void;
|
|
2332
2382
|
|
|
2333
|
-
export { API_KEY_EXCHANGE_PATH, 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 AgentInput, type AgentMessage, type AgentModel, type AgentProviderUsage, type AgentQueueItem, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, 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 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 };
|
|
2383
|
+
export { API_KEY_EXCHANGE_PATH, 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 AgentInput, type AgentMessage, type AgentModel, type AgentProviderUsage, type AgentQueueItem, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, 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 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 AppLoginTheme, 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 PasswordLoginMode, 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
|
@@ -596,6 +596,42 @@ interface AppUpdateInput {
|
|
|
596
596
|
* rejects `true` while the app inherits the platform login.
|
|
597
597
|
*/
|
|
598
598
|
passwordLoginEnabled?: boolean;
|
|
599
|
+
/**
|
|
600
|
+
* Where users type the password. Omission preserves the current value. Code Studio rejects
|
|
601
|
+
* `APP_FORM` unless password login is on, in this update or already saved, and turning password
|
|
602
|
+
* login off sets the mode back to `POPUP`.
|
|
603
|
+
*/
|
|
604
|
+
passwordLoginMode?: PasswordLoginMode;
|
|
605
|
+
/**
|
|
606
|
+
* Replaces the login theme whole: a field left out is cleared. `null`, or a theme without any
|
|
607
|
+
* field, clears it, and omission preserves it. A field set to `undefined` drops out of the JSON,
|
|
608
|
+
* so a theme whose fields are all `undefined` clears it too. Code Studio rejects a key it does not
|
|
609
|
+
* know, so a misspelled field cannot wipe the theme.
|
|
610
|
+
*/
|
|
611
|
+
loginTheme?: Partial<AppLoginTheme> | null;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Where an app user types the password. `POPUP` keeps it on the Mitra origin; `APP_FORM` lets the
|
|
615
|
+
* app draw its own form, so the password passes through app code.
|
|
616
|
+
*/
|
|
617
|
+
type PasswordLoginMode = "POPUP" | "APP_FORM";
|
|
618
|
+
/**
|
|
619
|
+
* Theme the Mitra password popup applies. A null or blank field falls back to the app name and the
|
|
620
|
+
* brand defaults. Code Studio checks the rules and rejects a value outside them.
|
|
621
|
+
*/
|
|
622
|
+
interface AppLoginTheme {
|
|
623
|
+
/** An https URL with a host, at most 2048 characters. */
|
|
624
|
+
logoUrl: string | null;
|
|
625
|
+
/** `#rgb` or `#rrggbb`. */
|
|
626
|
+
backgroundColor: string | null;
|
|
627
|
+
/** `light`, `dark` or `system`. */
|
|
628
|
+
colorScheme: string | null;
|
|
629
|
+
/** Plain text without `<`, `>` or control characters, at most 80 characters. */
|
|
630
|
+
title: string | null;
|
|
631
|
+
/** Plain text without `<`, `>` or control characters, at most 160 characters. */
|
|
632
|
+
subtitle: string | null;
|
|
633
|
+
/** `auto`, `pt-BR` or `en`. */
|
|
634
|
+
language: string | null;
|
|
599
635
|
}
|
|
600
636
|
interface AppDomain {
|
|
601
637
|
hostname: string;
|
|
@@ -621,6 +657,13 @@ interface AppSummary {
|
|
|
621
657
|
emailLoginEnabled?: boolean;
|
|
622
658
|
/** Absent on a Code Studio that predates password login. */
|
|
623
659
|
passwordLoginEnabled?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* `POPUP` or `APP_FORM`, as a string so a mode Code Studio adds later does not break the read.
|
|
662
|
+
* Absent on a Code Studio that predates the password login mode.
|
|
663
|
+
*/
|
|
664
|
+
passwordLoginMode?: string;
|
|
665
|
+
/** Null when the app has no theme. Absent on a Code Studio that predates the login theme. */
|
|
666
|
+
loginTheme?: AppLoginTheme | null;
|
|
624
667
|
externalAccessEnabled: boolean;
|
|
625
668
|
currentVersion: AppVersion | null;
|
|
626
669
|
createdAt: string;
|
|
@@ -645,6 +688,13 @@ interface AppDefinition {
|
|
|
645
688
|
emailLoginEnabled?: boolean;
|
|
646
689
|
/** Absent on a Code Studio that predates password login. */
|
|
647
690
|
passwordLoginEnabled?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* `POPUP` or `APP_FORM`, as a string so a mode Code Studio adds later does not break the read.
|
|
693
|
+
* Absent on a Code Studio that predates the password login mode.
|
|
694
|
+
*/
|
|
695
|
+
passwordLoginMode?: string;
|
|
696
|
+
/** Null when the app has no theme. Absent on a Code Studio that predates the login theme. */
|
|
697
|
+
loginTheme?: AppLoginTheme | null;
|
|
648
698
|
externalAccessEnabled: boolean;
|
|
649
699
|
currentVersion: AppVersion | null;
|
|
650
700
|
createdAt: string;
|
|
@@ -1307,7 +1357,7 @@ interface SendEmailInput {
|
|
|
1307
1357
|
* The account emails an app may rewrite with its own token. Messenger sends them from the app's
|
|
1308
1358
|
* sender settings or the brand, so a template never picks its sender.
|
|
1309
1359
|
*/
|
|
1310
|
-
type EmailTemplateType = "SIGN_IN" | "SSO_GUIDANCE" | "APP_USER_INVITED" | "APP_ACCESS_REQUIRED";
|
|
1360
|
+
type EmailTemplateType = "SIGN_IN" | "SSO_GUIDANCE" | "APP_USER_INVITED" | "APP_ACCESS_REQUIRED" | "PASSWORD_RESET" | "PASSWORD_CHANGED" | "ACCOUNT_LOCKED";
|
|
1311
1361
|
interface EmailTemplate {
|
|
1312
1362
|
id: string;
|
|
1313
1363
|
/**
|
|
@@ -2330,4 +2380,4 @@ declare function expectPage<T extends object>(value: unknown, context: string, e
|
|
|
2330
2380
|
declare function expectLegacyPage<T extends object>(value: unknown, context: string, errors?: SdkCoreErrorFactory, validateItem?: (value: unknown, context: string, errors: SdkCoreErrorFactory) => T): LegacyPage<T>;
|
|
2331
2381
|
declare function expectEmpty(value: unknown, context: string, errors?: SdkCoreErrorFactory): void;
|
|
2332
2382
|
|
|
2333
|
-
export { API_KEY_EXCHANGE_PATH, 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 AgentInput, type AgentMessage, type AgentModel, type AgentProviderUsage, type AgentQueueItem, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, 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 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 };
|
|
2383
|
+
export { API_KEY_EXCHANGE_PATH, 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 AgentInput, type AgentMessage, type AgentModel, type AgentProviderUsage, type AgentQueueItem, type AgentSendAndWaitOptions, type AgentSendOptions, type AgentSessionTransport, 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 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 AppLoginTheme, 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 PasswordLoginMode, 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.js
CHANGED
|
@@ -430,6 +430,14 @@ function expectAppSummary(value, context, errors = defaultSdkCoreErrorFactory) {
|
|
|
430
430
|
if (typeof app.tenantId !== "string") invalidField(context, "tenantId", errors);
|
|
431
431
|
return app;
|
|
432
432
|
}
|
|
433
|
+
var LOGIN_THEME_FIELDS = [
|
|
434
|
+
"logoUrl",
|
|
435
|
+
"backgroundColor",
|
|
436
|
+
"colorScheme",
|
|
437
|
+
"title",
|
|
438
|
+
"subtitle",
|
|
439
|
+
"language"
|
|
440
|
+
];
|
|
433
441
|
function expectAppFields(app, context, errors) {
|
|
434
442
|
for (const field of ["id", "shortId", "subdomain", "brand", "name", "planId"]) {
|
|
435
443
|
if (typeof app[field] !== "string") invalidField(context, field, errors);
|
|
@@ -442,6 +450,15 @@ function expectAppFields(app, context, errors) {
|
|
|
442
450
|
for (const field of ["emailLoginEnabled", "passwordLoginEnabled"]) {
|
|
443
451
|
if (field in app && typeof app[field] !== "boolean") invalidField(context, field, errors);
|
|
444
452
|
}
|
|
453
|
+
if ("passwordLoginMode" in app && typeof app.passwordLoginMode !== "string") {
|
|
454
|
+
invalidField(context, "passwordLoginMode", errors);
|
|
455
|
+
}
|
|
456
|
+
if ("loginTheme" in app && app.loginTheme !== null) {
|
|
457
|
+
const theme = expectObject(app.loginTheme, `${context} loginTheme`, errors);
|
|
458
|
+
for (const field of LOGIN_THEME_FIELDS) {
|
|
459
|
+
if (!isNullableString(theme[field])) invalidField(`${context} loginTheme`, field, errors);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
445
462
|
if (typeof app.externalAccessEnabled !== "boolean") {
|
|
446
463
|
invalidField(context, "externalAccessEnabled", errors);
|
|
447
464
|
}
|