@backflow.sdk/client 0.1.0 → 1.0.1
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.mts +105 -1
- package/dist/index.d.ts +105 -1
- package/dist/index.js +103 -2
- package/dist/index.mjs +101 -2
- package/package.json +7 -5
package/dist/index.d.mts
CHANGED
|
@@ -670,6 +670,19 @@ declare class TeamsResource {
|
|
|
670
670
|
projects(id: string): Promise<unknown>;
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
+
declare class TenantEmailTemplatesResource {
|
|
674
|
+
private client;
|
|
675
|
+
constructor(client: BackflowClient);
|
|
676
|
+
/** List email templates */
|
|
677
|
+
list(): Promise<unknown>;
|
|
678
|
+
/** Create or update email template */
|
|
679
|
+
create(data: Record<string, unknown>): Promise<unknown>;
|
|
680
|
+
/** Get email template */
|
|
681
|
+
get(templateId: string): Promise<unknown>;
|
|
682
|
+
/** Delete email template */
|
|
683
|
+
delete(templateId: string): Promise<unknown>;
|
|
684
|
+
}
|
|
685
|
+
|
|
673
686
|
declare class TenantWebhookReceiversResource {
|
|
674
687
|
private client;
|
|
675
688
|
constructor(client: BackflowClient);
|
|
@@ -843,6 +856,20 @@ declare class WorkspacesResource {
|
|
|
843
856
|
delete(id: string): Promise<unknown>;
|
|
844
857
|
}
|
|
845
858
|
|
|
859
|
+
type TTSProvider = "elevenlabs" | "edge";
|
|
860
|
+
type TTSVoice = "Rachel" | "Domi" | "Bella" | "Antoni" | "Elli" | "Josh" | "Arnold" | "Adam" | "Sam";
|
|
861
|
+
interface TTSRequest {
|
|
862
|
+
text: string;
|
|
863
|
+
voice?: TTSVoice;
|
|
864
|
+
provider?: TTSProvider;
|
|
865
|
+
}
|
|
866
|
+
declare class VoiceResource {
|
|
867
|
+
private client;
|
|
868
|
+
constructor(client: BackflowClient);
|
|
869
|
+
/** POST /voice/tts - Text-to-speech (returns audio Blob) */
|
|
870
|
+
tts(request: TTSRequest): Promise<Blob>;
|
|
871
|
+
}
|
|
872
|
+
|
|
846
873
|
interface AIChatOptions {
|
|
847
874
|
messages: Array<{
|
|
848
875
|
role: string;
|
|
@@ -1765,6 +1792,81 @@ declare class TenantResource {
|
|
|
1765
1792
|
getId(): Promise<string>;
|
|
1766
1793
|
}
|
|
1767
1794
|
|
|
1795
|
+
interface ClassifyRequest {
|
|
1796
|
+
prompt: string;
|
|
1797
|
+
conversationHistory?: Array<{
|
|
1798
|
+
role: string;
|
|
1799
|
+
content: string;
|
|
1800
|
+
}>;
|
|
1801
|
+
appId?: string;
|
|
1802
|
+
[key: string]: unknown;
|
|
1803
|
+
}
|
|
1804
|
+
interface ClassifyResponse {
|
|
1805
|
+
intent: string;
|
|
1806
|
+
confidence?: number;
|
|
1807
|
+
response?: string;
|
|
1808
|
+
[key: string]: unknown;
|
|
1809
|
+
}
|
|
1810
|
+
interface GenerateRequest {
|
|
1811
|
+
prompt: string;
|
|
1812
|
+
appId?: string;
|
|
1813
|
+
[key: string]: unknown;
|
|
1814
|
+
}
|
|
1815
|
+
interface RegenerateRequest {
|
|
1816
|
+
prompt: string;
|
|
1817
|
+
appId?: string;
|
|
1818
|
+
workflowId?: string;
|
|
1819
|
+
workflow?: unknown;
|
|
1820
|
+
[key: string]: unknown;
|
|
1821
|
+
}
|
|
1822
|
+
interface BuildRequest {
|
|
1823
|
+
workflow: unknown;
|
|
1824
|
+
appId?: string;
|
|
1825
|
+
[key: string]: unknown;
|
|
1826
|
+
}
|
|
1827
|
+
interface GenerateImageRequest {
|
|
1828
|
+
prompt: string;
|
|
1829
|
+
[key: string]: unknown;
|
|
1830
|
+
}
|
|
1831
|
+
interface MobileApp {
|
|
1832
|
+
id: string;
|
|
1833
|
+
name: string;
|
|
1834
|
+
version?: string;
|
|
1835
|
+
workflow?: unknown;
|
|
1836
|
+
[key: string]: unknown;
|
|
1837
|
+
}
|
|
1838
|
+
interface AppVersion {
|
|
1839
|
+
id: string;
|
|
1840
|
+
createdAt: string;
|
|
1841
|
+
[key: string]: unknown;
|
|
1842
|
+
}
|
|
1843
|
+
declare class MobileResource {
|
|
1844
|
+
private client;
|
|
1845
|
+
constructor(client: BackflowClient);
|
|
1846
|
+
/** Classify user intent (assist, create, update) */
|
|
1847
|
+
classify(data: ClassifyRequest): Promise<ClassifyResponse>;
|
|
1848
|
+
/** Generate a new app from a prompt */
|
|
1849
|
+
generate(data: GenerateRequest): Promise<unknown>;
|
|
1850
|
+
/** Regenerate/update an existing app */
|
|
1851
|
+
regenerate(data: RegenerateRequest): Promise<unknown>;
|
|
1852
|
+
/** Generate an image */
|
|
1853
|
+
generateImage(data: GenerateImageRequest): Promise<unknown>;
|
|
1854
|
+
/** Build/compile an app */
|
|
1855
|
+
build(data: BuildRequest): Promise<unknown>;
|
|
1856
|
+
/** List all apps */
|
|
1857
|
+
listApps(): Promise<MobileApp[]>;
|
|
1858
|
+
/** Get a specific app */
|
|
1859
|
+
getApp(appId: string): Promise<MobileApp>;
|
|
1860
|
+
/** Update app metadata */
|
|
1861
|
+
updateApp(appId: string, data: Partial<MobileApp>): Promise<MobileApp>;
|
|
1862
|
+
/** Get the workflow for an app */
|
|
1863
|
+
getAppWorkflow(appId: string): Promise<unknown>;
|
|
1864
|
+
/** List version history for an app */
|
|
1865
|
+
listVersions(appId: string): Promise<AppVersion[]>;
|
|
1866
|
+
/** Restore a specific version */
|
|
1867
|
+
restoreVersion(appId: string, versionId: string): Promise<unknown>;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1768
1870
|
declare class IntegrationsResource {
|
|
1769
1871
|
private client;
|
|
1770
1872
|
readonly stripe: StripeResource;
|
|
@@ -1816,6 +1918,8 @@ declare class BackflowSDK {
|
|
|
1816
1918
|
readonly user: UserResource;
|
|
1817
1919
|
readonly tenant: TenantResource;
|
|
1818
1920
|
readonly entities: EntitiesResource;
|
|
1921
|
+
readonly voice: VoiceResource;
|
|
1922
|
+
readonly mobile: MobileResource;
|
|
1819
1923
|
constructor(config: BackflowConfig);
|
|
1820
1924
|
get endpoint(): string;
|
|
1821
1925
|
get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T>;
|
|
@@ -1842,4 +1946,4 @@ declare function getSDKDocs(): string;
|
|
|
1842
1946
|
*/
|
|
1843
1947
|
declare function getSDKDocsCompact(): string;
|
|
1844
1948
|
|
|
1845
|
-
export { AgentAnalysisResource, AnalyticsResource$1 as AnalyticsResource, type AssetListParams, type AssetListResponse, type AssetStatsResponse, AssetsResource, BackflowSDK as Backflow, BackflowClient, type BackflowConfig, type BackflowError, type BackflowResponse, BackflowSDK, type BackflowSDKWithDynamicResources, type BatchExportOptions, type BatchExportResult, type BatchImportOptions, type BatchImportResult, type BatchJob, BatchResource, CACHE_OPERATIONS, CHUNKING_STRATEGIES, CLI_PROVIDERS, CONDITION_OPERATORS, CacheResource, DB_OPERATIONS, DB_PROVIDERS, type DatabaseFilter, type DatabaseFilterOperator, type DatabaseIntegrationAction, type DatabaseProvider, DefaultResource, DeploymentResource, EmbeddingsResource$1 as EmbeddingsResource, FeedbackResource, FilesResource$1 as FilesResource, GithubResource$1 as GithubResource, GoalsResource, GoogleDriveResource, HTTP_METHODS, type HttpMethod, IMAGE_DETAILS, JiraResource, LLM_PROVIDERS, LlmResource, McpToolsResource, NOTIFY_CHANNELS, NOTIFY_PRIORITIES, type NotifyChannel, type NotifyConfig, type NotifyPriority, type PausePoint, PolarResource, ProjectsResource, type PromptContextOptions, type PropertyValidation, PublishResource, QueuesResource$1 as QueuesResource, RAG_MODES, type RequestOptions, type SSESubscribeHandlers, STORAGE_OPERATIONS, SearchResource$1 as SearchResource, StripeResource, TOOL_PARAM_CONTEXT, TOOL_TYPES, TRIGGER_TYPES, TeamsResource, type TenantAsset, TenantWebhookReceiversResource, TenantWebhooksResource, ToolDiscoveryResource, type ToolType, TrackingResource, type TriggerType, TwitterResource, UsageResource$1 as UsageResource, WORKFLOW_VALIDATION_SCHEMA, WebsocketResource, type WorkflowValidationSchema, WorkflowsResource$1 as WorkflowsResource, WorkspacesResource, createBackflow, getSDKDocs, getSDKDocsCompact, toCompactContext, toPromptContext };
|
|
1949
|
+
export { AgentAnalysisResource, AnalyticsResource$1 as AnalyticsResource, type AssetListParams, type AssetListResponse, type AssetStatsResponse, AssetsResource, BackflowSDK as Backflow, BackflowClient, type BackflowConfig, type BackflowError, type BackflowResponse, BackflowSDK, type BackflowSDKWithDynamicResources, type BatchExportOptions, type BatchExportResult, type BatchImportOptions, type BatchImportResult, type BatchJob, BatchResource, CACHE_OPERATIONS, CHUNKING_STRATEGIES, CLI_PROVIDERS, CONDITION_OPERATORS, CacheResource, DB_OPERATIONS, DB_PROVIDERS, type DatabaseFilter, type DatabaseFilterOperator, type DatabaseIntegrationAction, type DatabaseProvider, DefaultResource, DeploymentResource, EmbeddingsResource$1 as EmbeddingsResource, FeedbackResource, FilesResource$1 as FilesResource, GithubResource$1 as GithubResource, GoalsResource, GoogleDriveResource, HTTP_METHODS, type HttpMethod, IMAGE_DETAILS, JiraResource, LLM_PROVIDERS, LlmResource, McpToolsResource, NOTIFY_CHANNELS, NOTIFY_PRIORITIES, type NotifyChannel, type NotifyConfig, type NotifyPriority, type PausePoint, PolarResource, ProjectsResource, type PromptContextOptions, type PropertyValidation, PublishResource, QueuesResource$1 as QueuesResource, RAG_MODES, type RequestOptions, type SSESubscribeHandlers, STORAGE_OPERATIONS, SearchResource$1 as SearchResource, StripeResource, TOOL_PARAM_CONTEXT, TOOL_TYPES, TRIGGER_TYPES, type TTSProvider, type TTSRequest, type TTSVoice, TeamsResource, type TenantAsset, TenantEmailTemplatesResource, TenantWebhookReceiversResource, TenantWebhooksResource, ToolDiscoveryResource, type ToolType, TrackingResource, type TriggerType, TwitterResource, UsageResource$1 as UsageResource, VoiceResource, WORKFLOW_VALIDATION_SCHEMA, WebsocketResource, type WorkflowValidationSchema, WorkflowsResource$1 as WorkflowsResource, WorkspacesResource, createBackflow, getSDKDocs, getSDKDocsCompact, toCompactContext, toPromptContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -670,6 +670,19 @@ declare class TeamsResource {
|
|
|
670
670
|
projects(id: string): Promise<unknown>;
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
+
declare class TenantEmailTemplatesResource {
|
|
674
|
+
private client;
|
|
675
|
+
constructor(client: BackflowClient);
|
|
676
|
+
/** List email templates */
|
|
677
|
+
list(): Promise<unknown>;
|
|
678
|
+
/** Create or update email template */
|
|
679
|
+
create(data: Record<string, unknown>): Promise<unknown>;
|
|
680
|
+
/** Get email template */
|
|
681
|
+
get(templateId: string): Promise<unknown>;
|
|
682
|
+
/** Delete email template */
|
|
683
|
+
delete(templateId: string): Promise<unknown>;
|
|
684
|
+
}
|
|
685
|
+
|
|
673
686
|
declare class TenantWebhookReceiversResource {
|
|
674
687
|
private client;
|
|
675
688
|
constructor(client: BackflowClient);
|
|
@@ -843,6 +856,20 @@ declare class WorkspacesResource {
|
|
|
843
856
|
delete(id: string): Promise<unknown>;
|
|
844
857
|
}
|
|
845
858
|
|
|
859
|
+
type TTSProvider = "elevenlabs" | "edge";
|
|
860
|
+
type TTSVoice = "Rachel" | "Domi" | "Bella" | "Antoni" | "Elli" | "Josh" | "Arnold" | "Adam" | "Sam";
|
|
861
|
+
interface TTSRequest {
|
|
862
|
+
text: string;
|
|
863
|
+
voice?: TTSVoice;
|
|
864
|
+
provider?: TTSProvider;
|
|
865
|
+
}
|
|
866
|
+
declare class VoiceResource {
|
|
867
|
+
private client;
|
|
868
|
+
constructor(client: BackflowClient);
|
|
869
|
+
/** POST /voice/tts - Text-to-speech (returns audio Blob) */
|
|
870
|
+
tts(request: TTSRequest): Promise<Blob>;
|
|
871
|
+
}
|
|
872
|
+
|
|
846
873
|
interface AIChatOptions {
|
|
847
874
|
messages: Array<{
|
|
848
875
|
role: string;
|
|
@@ -1765,6 +1792,81 @@ declare class TenantResource {
|
|
|
1765
1792
|
getId(): Promise<string>;
|
|
1766
1793
|
}
|
|
1767
1794
|
|
|
1795
|
+
interface ClassifyRequest {
|
|
1796
|
+
prompt: string;
|
|
1797
|
+
conversationHistory?: Array<{
|
|
1798
|
+
role: string;
|
|
1799
|
+
content: string;
|
|
1800
|
+
}>;
|
|
1801
|
+
appId?: string;
|
|
1802
|
+
[key: string]: unknown;
|
|
1803
|
+
}
|
|
1804
|
+
interface ClassifyResponse {
|
|
1805
|
+
intent: string;
|
|
1806
|
+
confidence?: number;
|
|
1807
|
+
response?: string;
|
|
1808
|
+
[key: string]: unknown;
|
|
1809
|
+
}
|
|
1810
|
+
interface GenerateRequest {
|
|
1811
|
+
prompt: string;
|
|
1812
|
+
appId?: string;
|
|
1813
|
+
[key: string]: unknown;
|
|
1814
|
+
}
|
|
1815
|
+
interface RegenerateRequest {
|
|
1816
|
+
prompt: string;
|
|
1817
|
+
appId?: string;
|
|
1818
|
+
workflowId?: string;
|
|
1819
|
+
workflow?: unknown;
|
|
1820
|
+
[key: string]: unknown;
|
|
1821
|
+
}
|
|
1822
|
+
interface BuildRequest {
|
|
1823
|
+
workflow: unknown;
|
|
1824
|
+
appId?: string;
|
|
1825
|
+
[key: string]: unknown;
|
|
1826
|
+
}
|
|
1827
|
+
interface GenerateImageRequest {
|
|
1828
|
+
prompt: string;
|
|
1829
|
+
[key: string]: unknown;
|
|
1830
|
+
}
|
|
1831
|
+
interface MobileApp {
|
|
1832
|
+
id: string;
|
|
1833
|
+
name: string;
|
|
1834
|
+
version?: string;
|
|
1835
|
+
workflow?: unknown;
|
|
1836
|
+
[key: string]: unknown;
|
|
1837
|
+
}
|
|
1838
|
+
interface AppVersion {
|
|
1839
|
+
id: string;
|
|
1840
|
+
createdAt: string;
|
|
1841
|
+
[key: string]: unknown;
|
|
1842
|
+
}
|
|
1843
|
+
declare class MobileResource {
|
|
1844
|
+
private client;
|
|
1845
|
+
constructor(client: BackflowClient);
|
|
1846
|
+
/** Classify user intent (assist, create, update) */
|
|
1847
|
+
classify(data: ClassifyRequest): Promise<ClassifyResponse>;
|
|
1848
|
+
/** Generate a new app from a prompt */
|
|
1849
|
+
generate(data: GenerateRequest): Promise<unknown>;
|
|
1850
|
+
/** Regenerate/update an existing app */
|
|
1851
|
+
regenerate(data: RegenerateRequest): Promise<unknown>;
|
|
1852
|
+
/** Generate an image */
|
|
1853
|
+
generateImage(data: GenerateImageRequest): Promise<unknown>;
|
|
1854
|
+
/** Build/compile an app */
|
|
1855
|
+
build(data: BuildRequest): Promise<unknown>;
|
|
1856
|
+
/** List all apps */
|
|
1857
|
+
listApps(): Promise<MobileApp[]>;
|
|
1858
|
+
/** Get a specific app */
|
|
1859
|
+
getApp(appId: string): Promise<MobileApp>;
|
|
1860
|
+
/** Update app metadata */
|
|
1861
|
+
updateApp(appId: string, data: Partial<MobileApp>): Promise<MobileApp>;
|
|
1862
|
+
/** Get the workflow for an app */
|
|
1863
|
+
getAppWorkflow(appId: string): Promise<unknown>;
|
|
1864
|
+
/** List version history for an app */
|
|
1865
|
+
listVersions(appId: string): Promise<AppVersion[]>;
|
|
1866
|
+
/** Restore a specific version */
|
|
1867
|
+
restoreVersion(appId: string, versionId: string): Promise<unknown>;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1768
1870
|
declare class IntegrationsResource {
|
|
1769
1871
|
private client;
|
|
1770
1872
|
readonly stripe: StripeResource;
|
|
@@ -1816,6 +1918,8 @@ declare class BackflowSDK {
|
|
|
1816
1918
|
readonly user: UserResource;
|
|
1817
1919
|
readonly tenant: TenantResource;
|
|
1818
1920
|
readonly entities: EntitiesResource;
|
|
1921
|
+
readonly voice: VoiceResource;
|
|
1922
|
+
readonly mobile: MobileResource;
|
|
1819
1923
|
constructor(config: BackflowConfig);
|
|
1820
1924
|
get endpoint(): string;
|
|
1821
1925
|
get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T>;
|
|
@@ -1842,4 +1946,4 @@ declare function getSDKDocs(): string;
|
|
|
1842
1946
|
*/
|
|
1843
1947
|
declare function getSDKDocsCompact(): string;
|
|
1844
1948
|
|
|
1845
|
-
export { AgentAnalysisResource, AnalyticsResource$1 as AnalyticsResource, type AssetListParams, type AssetListResponse, type AssetStatsResponse, AssetsResource, BackflowSDK as Backflow, BackflowClient, type BackflowConfig, type BackflowError, type BackflowResponse, BackflowSDK, type BackflowSDKWithDynamicResources, type BatchExportOptions, type BatchExportResult, type BatchImportOptions, type BatchImportResult, type BatchJob, BatchResource, CACHE_OPERATIONS, CHUNKING_STRATEGIES, CLI_PROVIDERS, CONDITION_OPERATORS, CacheResource, DB_OPERATIONS, DB_PROVIDERS, type DatabaseFilter, type DatabaseFilterOperator, type DatabaseIntegrationAction, type DatabaseProvider, DefaultResource, DeploymentResource, EmbeddingsResource$1 as EmbeddingsResource, FeedbackResource, FilesResource$1 as FilesResource, GithubResource$1 as GithubResource, GoalsResource, GoogleDriveResource, HTTP_METHODS, type HttpMethod, IMAGE_DETAILS, JiraResource, LLM_PROVIDERS, LlmResource, McpToolsResource, NOTIFY_CHANNELS, NOTIFY_PRIORITIES, type NotifyChannel, type NotifyConfig, type NotifyPriority, type PausePoint, PolarResource, ProjectsResource, type PromptContextOptions, type PropertyValidation, PublishResource, QueuesResource$1 as QueuesResource, RAG_MODES, type RequestOptions, type SSESubscribeHandlers, STORAGE_OPERATIONS, SearchResource$1 as SearchResource, StripeResource, TOOL_PARAM_CONTEXT, TOOL_TYPES, TRIGGER_TYPES, TeamsResource, type TenantAsset, TenantWebhookReceiversResource, TenantWebhooksResource, ToolDiscoveryResource, type ToolType, TrackingResource, type TriggerType, TwitterResource, UsageResource$1 as UsageResource, WORKFLOW_VALIDATION_SCHEMA, WebsocketResource, type WorkflowValidationSchema, WorkflowsResource$1 as WorkflowsResource, WorkspacesResource, createBackflow, getSDKDocs, getSDKDocsCompact, toCompactContext, toPromptContext };
|
|
1949
|
+
export { AgentAnalysisResource, AnalyticsResource$1 as AnalyticsResource, type AssetListParams, type AssetListResponse, type AssetStatsResponse, AssetsResource, BackflowSDK as Backflow, BackflowClient, type BackflowConfig, type BackflowError, type BackflowResponse, BackflowSDK, type BackflowSDKWithDynamicResources, type BatchExportOptions, type BatchExportResult, type BatchImportOptions, type BatchImportResult, type BatchJob, BatchResource, CACHE_OPERATIONS, CHUNKING_STRATEGIES, CLI_PROVIDERS, CONDITION_OPERATORS, CacheResource, DB_OPERATIONS, DB_PROVIDERS, type DatabaseFilter, type DatabaseFilterOperator, type DatabaseIntegrationAction, type DatabaseProvider, DefaultResource, DeploymentResource, EmbeddingsResource$1 as EmbeddingsResource, FeedbackResource, FilesResource$1 as FilesResource, GithubResource$1 as GithubResource, GoalsResource, GoogleDriveResource, HTTP_METHODS, type HttpMethod, IMAGE_DETAILS, JiraResource, LLM_PROVIDERS, LlmResource, McpToolsResource, NOTIFY_CHANNELS, NOTIFY_PRIORITIES, type NotifyChannel, type NotifyConfig, type NotifyPriority, type PausePoint, PolarResource, ProjectsResource, type PromptContextOptions, type PropertyValidation, PublishResource, QueuesResource$1 as QueuesResource, RAG_MODES, type RequestOptions, type SSESubscribeHandlers, STORAGE_OPERATIONS, SearchResource$1 as SearchResource, StripeResource, TOOL_PARAM_CONTEXT, TOOL_TYPES, TRIGGER_TYPES, type TTSProvider, type TTSRequest, type TTSVoice, TeamsResource, type TenantAsset, TenantEmailTemplatesResource, TenantWebhookReceiversResource, TenantWebhooksResource, ToolDiscoveryResource, type ToolType, TrackingResource, type TriggerType, TwitterResource, UsageResource$1 as UsageResource, VoiceResource, WORKFLOW_VALIDATION_SCHEMA, WebsocketResource, type WorkflowValidationSchema, WorkflowsResource$1 as WorkflowsResource, WorkspacesResource, createBackflow, getSDKDocs, getSDKDocsCompact, toCompactContext, toPromptContext };
|
package/dist/index.js
CHANGED
|
@@ -62,12 +62,14 @@ __export(index_exports, {
|
|
|
62
62
|
TOOL_TYPES: () => TOOL_TYPES,
|
|
63
63
|
TRIGGER_TYPES: () => TRIGGER_TYPES,
|
|
64
64
|
TeamsResource: () => TeamsResource,
|
|
65
|
+
TenantEmailTemplatesResource: () => TenantEmailTemplatesResource,
|
|
65
66
|
TenantWebhookReceiversResource: () => TenantWebhookReceiversResource,
|
|
66
67
|
TenantWebhooksResource: () => TenantWebhooksResource,
|
|
67
68
|
ToolDiscoveryResource: () => ToolDiscoveryResource,
|
|
68
69
|
TrackingResource: () => TrackingResource,
|
|
69
70
|
TwitterResource: () => TwitterResource,
|
|
70
71
|
UsageResource: () => UsageResource,
|
|
72
|
+
VoiceResource: () => VoiceResource,
|
|
71
73
|
WORKFLOW_VALIDATION_SCHEMA: () => WORKFLOW_VALIDATION_SCHEMA,
|
|
72
74
|
WebsocketResource: () => WebsocketResource,
|
|
73
75
|
WorkflowsResource: () => WorkflowsResource,
|
|
@@ -1131,6 +1133,29 @@ var TeamsResource = class {
|
|
|
1131
1133
|
}
|
|
1132
1134
|
};
|
|
1133
1135
|
|
|
1136
|
+
// src/generated/tenant-email-templates.ts
|
|
1137
|
+
var TenantEmailTemplatesResource = class {
|
|
1138
|
+
constructor(client) {
|
|
1139
|
+
this.client = client;
|
|
1140
|
+
}
|
|
1141
|
+
/** List email templates */
|
|
1142
|
+
async list() {
|
|
1143
|
+
return this.client.get("/tenant/email-templates");
|
|
1144
|
+
}
|
|
1145
|
+
/** Create or update email template */
|
|
1146
|
+
async create(data) {
|
|
1147
|
+
return this.client.post("/tenant/email-templates", data);
|
|
1148
|
+
}
|
|
1149
|
+
/** Get email template */
|
|
1150
|
+
async get(templateId) {
|
|
1151
|
+
return this.client.get(`/tenant/email-templates/${templateId}`);
|
|
1152
|
+
}
|
|
1153
|
+
/** Delete email template */
|
|
1154
|
+
async delete(templateId) {
|
|
1155
|
+
return this.client.delete(`/tenant/email-templates/${templateId}`);
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1134
1159
|
// src/generated/tenant-webhook-receivers.ts
|
|
1135
1160
|
var TenantWebhookReceiversResource = class {
|
|
1136
1161
|
constructor(client) {
|
|
@@ -1450,6 +1475,25 @@ var WorkspacesResource = class {
|
|
|
1450
1475
|
}
|
|
1451
1476
|
};
|
|
1452
1477
|
|
|
1478
|
+
// src/generated/voice.ts
|
|
1479
|
+
var VoiceResource = class {
|
|
1480
|
+
constructor(client) {
|
|
1481
|
+
this.client = client;
|
|
1482
|
+
}
|
|
1483
|
+
/** POST /voice/tts - Text-to-speech (returns audio Blob) */
|
|
1484
|
+
async tts(request) {
|
|
1485
|
+
const response = await this.client.post("/voice/tts", request);
|
|
1486
|
+
if (response instanceof ArrayBuffer) {
|
|
1487
|
+
return new Blob([response], { type: "audio/mpeg" });
|
|
1488
|
+
}
|
|
1489
|
+
if (response && typeof response === "object" && "audioUrl" in response && response.audioUrl) {
|
|
1490
|
+
const audioResponse = await fetch(response.audioUrl);
|
|
1491
|
+
return audioResponse.blob();
|
|
1492
|
+
}
|
|
1493
|
+
throw new Error("Unexpected TTS response format");
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1453
1497
|
// src/resources/ai.ts
|
|
1454
1498
|
var AIResource = class {
|
|
1455
1499
|
constructor(client) {
|
|
@@ -1734,18 +1778,20 @@ var FilesResource2 = class {
|
|
|
1734
1778
|
this.client = client;
|
|
1735
1779
|
}
|
|
1736
1780
|
async upload(file, options = {}) {
|
|
1737
|
-
|
|
1781
|
+
const response = await this.client.upload("/files/upload", file, {
|
|
1738
1782
|
bucket: options.bucket || "squeed-storage",
|
|
1739
1783
|
entityType: options.entityType || "project",
|
|
1740
1784
|
entityId: options.entityId || "default"
|
|
1741
1785
|
});
|
|
1786
|
+
return response.file;
|
|
1742
1787
|
}
|
|
1743
1788
|
async uploadMultiple(files, options = {}) {
|
|
1744
|
-
|
|
1789
|
+
const response = await this.client.upload("/files/upload-multiple", files, {
|
|
1745
1790
|
bucket: options.bucket || "squeed-storage",
|
|
1746
1791
|
entityType: options.entityType || "project",
|
|
1747
1792
|
entityId: options.entityId || "default"
|
|
1748
1793
|
});
|
|
1794
|
+
return response.files;
|
|
1749
1795
|
}
|
|
1750
1796
|
async list(entityType, entityId, options) {
|
|
1751
1797
|
const params = {};
|
|
@@ -2685,6 +2731,57 @@ var TenantResource = class {
|
|
|
2685
2731
|
}
|
|
2686
2732
|
};
|
|
2687
2733
|
|
|
2734
|
+
// src/resources/mobile.ts
|
|
2735
|
+
var MobileResource = class {
|
|
2736
|
+
constructor(client) {
|
|
2737
|
+
this.client = client;
|
|
2738
|
+
}
|
|
2739
|
+
/** Classify user intent (assist, create, update) */
|
|
2740
|
+
async classify(data) {
|
|
2741
|
+
return this.client.post("/mobile/classify", data);
|
|
2742
|
+
}
|
|
2743
|
+
/** Generate a new app from a prompt */
|
|
2744
|
+
async generate(data) {
|
|
2745
|
+
return this.client.post("/mobile/generate", data);
|
|
2746
|
+
}
|
|
2747
|
+
/** Regenerate/update an existing app */
|
|
2748
|
+
async regenerate(data) {
|
|
2749
|
+
return this.client.post("/mobile/regenerate", data);
|
|
2750
|
+
}
|
|
2751
|
+
/** Generate an image */
|
|
2752
|
+
async generateImage(data) {
|
|
2753
|
+
return this.client.post("/mobile/generate-image", data);
|
|
2754
|
+
}
|
|
2755
|
+
/** Build/compile an app */
|
|
2756
|
+
async build(data) {
|
|
2757
|
+
return this.client.post("/mobile/builder/build", data);
|
|
2758
|
+
}
|
|
2759
|
+
/** List all apps */
|
|
2760
|
+
async listApps() {
|
|
2761
|
+
return this.client.get("/mobile/apps");
|
|
2762
|
+
}
|
|
2763
|
+
/** Get a specific app */
|
|
2764
|
+
async getApp(appId) {
|
|
2765
|
+
return this.client.get(`/mobile/apps/${appId}`);
|
|
2766
|
+
}
|
|
2767
|
+
/** Update app metadata */
|
|
2768
|
+
async updateApp(appId, data) {
|
|
2769
|
+
return this.client.put(`/mobile/apps/${appId}`, data);
|
|
2770
|
+
}
|
|
2771
|
+
/** Get the workflow for an app */
|
|
2772
|
+
async getAppWorkflow(appId) {
|
|
2773
|
+
return this.client.get(`/mobile/apps/${appId}/workflow`);
|
|
2774
|
+
}
|
|
2775
|
+
/** List version history for an app */
|
|
2776
|
+
async listVersions(appId) {
|
|
2777
|
+
return this.client.get(`/mobile/apps/${appId}/versions`);
|
|
2778
|
+
}
|
|
2779
|
+
/** Restore a specific version */
|
|
2780
|
+
async restoreVersion(appId, versionId) {
|
|
2781
|
+
return this.client.post(`/mobile/apps/${appId}/versions/${versionId}/restore`);
|
|
2782
|
+
}
|
|
2783
|
+
};
|
|
2784
|
+
|
|
2688
2785
|
// src/sdk.ts
|
|
2689
2786
|
var IntegrationsResource = class {
|
|
2690
2787
|
constructor(client) {
|
|
@@ -2734,6 +2831,8 @@ var BackflowSDK = class {
|
|
|
2734
2831
|
this.user = new UserResource(this.client);
|
|
2735
2832
|
this.tenant = new TenantResource(this.client);
|
|
2736
2833
|
this.entities = new EntitiesResource(this.client);
|
|
2834
|
+
this.voice = new VoiceResource(this.client);
|
|
2835
|
+
this.mobile = new MobileResource(this.client);
|
|
2737
2836
|
}
|
|
2738
2837
|
get endpoint() {
|
|
2739
2838
|
return this.client.endpoint;
|
|
@@ -2927,12 +3026,14 @@ PAGINATION (auto-handled by renderer):
|
|
|
2927
3026
|
TOOL_TYPES,
|
|
2928
3027
|
TRIGGER_TYPES,
|
|
2929
3028
|
TeamsResource,
|
|
3029
|
+
TenantEmailTemplatesResource,
|
|
2930
3030
|
TenantWebhookReceiversResource,
|
|
2931
3031
|
TenantWebhooksResource,
|
|
2932
3032
|
ToolDiscoveryResource,
|
|
2933
3033
|
TrackingResource,
|
|
2934
3034
|
TwitterResource,
|
|
2935
3035
|
UsageResource,
|
|
3036
|
+
VoiceResource,
|
|
2936
3037
|
WORKFLOW_VALIDATION_SCHEMA,
|
|
2937
3038
|
WebsocketResource,
|
|
2938
3039
|
WorkflowsResource,
|
package/dist/index.mjs
CHANGED
|
@@ -1049,6 +1049,29 @@ var TeamsResource = class {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
};
|
|
1051
1051
|
|
|
1052
|
+
// src/generated/tenant-email-templates.ts
|
|
1053
|
+
var TenantEmailTemplatesResource = class {
|
|
1054
|
+
constructor(client) {
|
|
1055
|
+
this.client = client;
|
|
1056
|
+
}
|
|
1057
|
+
/** List email templates */
|
|
1058
|
+
async list() {
|
|
1059
|
+
return this.client.get("/tenant/email-templates");
|
|
1060
|
+
}
|
|
1061
|
+
/** Create or update email template */
|
|
1062
|
+
async create(data) {
|
|
1063
|
+
return this.client.post("/tenant/email-templates", data);
|
|
1064
|
+
}
|
|
1065
|
+
/** Get email template */
|
|
1066
|
+
async get(templateId) {
|
|
1067
|
+
return this.client.get(`/tenant/email-templates/${templateId}`);
|
|
1068
|
+
}
|
|
1069
|
+
/** Delete email template */
|
|
1070
|
+
async delete(templateId) {
|
|
1071
|
+
return this.client.delete(`/tenant/email-templates/${templateId}`);
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1052
1075
|
// src/generated/tenant-webhook-receivers.ts
|
|
1053
1076
|
var TenantWebhookReceiversResource = class {
|
|
1054
1077
|
constructor(client) {
|
|
@@ -1368,6 +1391,25 @@ var WorkspacesResource = class {
|
|
|
1368
1391
|
}
|
|
1369
1392
|
};
|
|
1370
1393
|
|
|
1394
|
+
// src/generated/voice.ts
|
|
1395
|
+
var VoiceResource = class {
|
|
1396
|
+
constructor(client) {
|
|
1397
|
+
this.client = client;
|
|
1398
|
+
}
|
|
1399
|
+
/** POST /voice/tts - Text-to-speech (returns audio Blob) */
|
|
1400
|
+
async tts(request) {
|
|
1401
|
+
const response = await this.client.post("/voice/tts", request);
|
|
1402
|
+
if (response instanceof ArrayBuffer) {
|
|
1403
|
+
return new Blob([response], { type: "audio/mpeg" });
|
|
1404
|
+
}
|
|
1405
|
+
if (response && typeof response === "object" && "audioUrl" in response && response.audioUrl) {
|
|
1406
|
+
const audioResponse = await fetch(response.audioUrl);
|
|
1407
|
+
return audioResponse.blob();
|
|
1408
|
+
}
|
|
1409
|
+
throw new Error("Unexpected TTS response format");
|
|
1410
|
+
}
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1371
1413
|
// src/resources/ai.ts
|
|
1372
1414
|
var AIResource = class {
|
|
1373
1415
|
constructor(client) {
|
|
@@ -1652,18 +1694,20 @@ var FilesResource2 = class {
|
|
|
1652
1694
|
this.client = client;
|
|
1653
1695
|
}
|
|
1654
1696
|
async upload(file, options = {}) {
|
|
1655
|
-
|
|
1697
|
+
const response = await this.client.upload("/files/upload", file, {
|
|
1656
1698
|
bucket: options.bucket || "squeed-storage",
|
|
1657
1699
|
entityType: options.entityType || "project",
|
|
1658
1700
|
entityId: options.entityId || "default"
|
|
1659
1701
|
});
|
|
1702
|
+
return response.file;
|
|
1660
1703
|
}
|
|
1661
1704
|
async uploadMultiple(files, options = {}) {
|
|
1662
|
-
|
|
1705
|
+
const response = await this.client.upload("/files/upload-multiple", files, {
|
|
1663
1706
|
bucket: options.bucket || "squeed-storage",
|
|
1664
1707
|
entityType: options.entityType || "project",
|
|
1665
1708
|
entityId: options.entityId || "default"
|
|
1666
1709
|
});
|
|
1710
|
+
return response.files;
|
|
1667
1711
|
}
|
|
1668
1712
|
async list(entityType, entityId, options) {
|
|
1669
1713
|
const params = {};
|
|
@@ -2603,6 +2647,57 @@ var TenantResource = class {
|
|
|
2603
2647
|
}
|
|
2604
2648
|
};
|
|
2605
2649
|
|
|
2650
|
+
// src/resources/mobile.ts
|
|
2651
|
+
var MobileResource = class {
|
|
2652
|
+
constructor(client) {
|
|
2653
|
+
this.client = client;
|
|
2654
|
+
}
|
|
2655
|
+
/** Classify user intent (assist, create, update) */
|
|
2656
|
+
async classify(data) {
|
|
2657
|
+
return this.client.post("/mobile/classify", data);
|
|
2658
|
+
}
|
|
2659
|
+
/** Generate a new app from a prompt */
|
|
2660
|
+
async generate(data) {
|
|
2661
|
+
return this.client.post("/mobile/generate", data);
|
|
2662
|
+
}
|
|
2663
|
+
/** Regenerate/update an existing app */
|
|
2664
|
+
async regenerate(data) {
|
|
2665
|
+
return this.client.post("/mobile/regenerate", data);
|
|
2666
|
+
}
|
|
2667
|
+
/** Generate an image */
|
|
2668
|
+
async generateImage(data) {
|
|
2669
|
+
return this.client.post("/mobile/generate-image", data);
|
|
2670
|
+
}
|
|
2671
|
+
/** Build/compile an app */
|
|
2672
|
+
async build(data) {
|
|
2673
|
+
return this.client.post("/mobile/builder/build", data);
|
|
2674
|
+
}
|
|
2675
|
+
/** List all apps */
|
|
2676
|
+
async listApps() {
|
|
2677
|
+
return this.client.get("/mobile/apps");
|
|
2678
|
+
}
|
|
2679
|
+
/** Get a specific app */
|
|
2680
|
+
async getApp(appId) {
|
|
2681
|
+
return this.client.get(`/mobile/apps/${appId}`);
|
|
2682
|
+
}
|
|
2683
|
+
/** Update app metadata */
|
|
2684
|
+
async updateApp(appId, data) {
|
|
2685
|
+
return this.client.put(`/mobile/apps/${appId}`, data);
|
|
2686
|
+
}
|
|
2687
|
+
/** Get the workflow for an app */
|
|
2688
|
+
async getAppWorkflow(appId) {
|
|
2689
|
+
return this.client.get(`/mobile/apps/${appId}/workflow`);
|
|
2690
|
+
}
|
|
2691
|
+
/** List version history for an app */
|
|
2692
|
+
async listVersions(appId) {
|
|
2693
|
+
return this.client.get(`/mobile/apps/${appId}/versions`);
|
|
2694
|
+
}
|
|
2695
|
+
/** Restore a specific version */
|
|
2696
|
+
async restoreVersion(appId, versionId) {
|
|
2697
|
+
return this.client.post(`/mobile/apps/${appId}/versions/${versionId}/restore`);
|
|
2698
|
+
}
|
|
2699
|
+
};
|
|
2700
|
+
|
|
2606
2701
|
// src/sdk.ts
|
|
2607
2702
|
var IntegrationsResource = class {
|
|
2608
2703
|
constructor(client) {
|
|
@@ -2652,6 +2747,8 @@ var BackflowSDK = class {
|
|
|
2652
2747
|
this.user = new UserResource(this.client);
|
|
2653
2748
|
this.tenant = new TenantResource(this.client);
|
|
2654
2749
|
this.entities = new EntitiesResource(this.client);
|
|
2750
|
+
this.voice = new VoiceResource(this.client);
|
|
2751
|
+
this.mobile = new MobileResource(this.client);
|
|
2655
2752
|
}
|
|
2656
2753
|
get endpoint() {
|
|
2657
2754
|
return this.client.endpoint;
|
|
@@ -2844,12 +2941,14 @@ export {
|
|
|
2844
2941
|
TOOL_TYPES,
|
|
2845
2942
|
TRIGGER_TYPES,
|
|
2846
2943
|
TeamsResource,
|
|
2944
|
+
TenantEmailTemplatesResource,
|
|
2847
2945
|
TenantWebhookReceiversResource,
|
|
2848
2946
|
TenantWebhooksResource,
|
|
2849
2947
|
ToolDiscoveryResource,
|
|
2850
2948
|
TrackingResource,
|
|
2851
2949
|
TwitterResource,
|
|
2852
2950
|
UsageResource,
|
|
2951
|
+
VoiceResource,
|
|
2853
2952
|
WORKFLOW_VALIDATION_SCHEMA,
|
|
2854
2953
|
WebsocketResource,
|
|
2855
2954
|
WorkflowsResource,
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backflow.sdk/client",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Tenant SDK for Backflow API (user-facing resources only)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
|
+
"browser": "dist/backflow.umd.js",
|
|
7
8
|
"types": "dist/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
12
|
"import": "./dist/index.mjs",
|
|
12
|
-
"require": "./dist/index.js"
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"browser": "./dist/backflow.umd.js"
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
@@ -18,8 +20,8 @@
|
|
|
18
20
|
"scripts": {
|
|
19
21
|
"generate": "tsx scripts/generate.ts",
|
|
20
22
|
"generate:local": "tsx scripts/generate.ts --local",
|
|
21
|
-
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
22
|
-
"build:tenant": "tsx scripts/generate.ts && tsup src/index.ts --format cjs,esm --dts",
|
|
23
|
+
"build": "tsup src/index.ts --format cjs,esm,iife --dts --globalName createBackflow --outExtension.iife.js=.umd.js",
|
|
24
|
+
"build:tenant": "tsx scripts/generate.ts && tsup src/index.ts --format cjs,esm,iife --dts --globalName createBackflow --outExtension.iife.js=.umd.js",
|
|
23
25
|
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
24
26
|
"clean": "rm -rf dist src/generated",
|
|
25
27
|
"typecheck": "tsc --noEmit"
|
|
@@ -44,4 +46,4 @@
|
|
|
44
46
|
"optional": true
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
}
|
|
49
|
+
}
|