@blinkdotnew/sdk 2.2.0 → 2.2.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 +67 -1
- package/dist/index.d.ts +67 -1
- package/dist/index.js +54 -0
- package/dist/index.mjs +54 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -807,6 +807,54 @@ interface BlinkNotifications {
|
|
|
807
807
|
email(params: SendEmailRequest): Promise<SendEmailResponse>;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
+
type ConnectorProvider = 'discord' | 'notion' | 'google_drive' | 'google_calendar' | 'ai';
|
|
811
|
+
type ConnectorAuthMode = 'oauth' | 'api_key' | 'blink_managed' | 'hybrid';
|
|
812
|
+
interface ConnectorStatusData {
|
|
813
|
+
connected: boolean;
|
|
814
|
+
provider: ConnectorProvider;
|
|
815
|
+
auth_mode?: ConnectorAuthMode;
|
|
816
|
+
account_id?: string;
|
|
817
|
+
metadata?: Record<string, unknown>;
|
|
818
|
+
expires_at?: any;
|
|
819
|
+
scopes?: string[];
|
|
820
|
+
}
|
|
821
|
+
interface ConnectorStatusResponse {
|
|
822
|
+
success: boolean;
|
|
823
|
+
data: ConnectorStatusData;
|
|
824
|
+
}
|
|
825
|
+
interface ConnectorExecuteRequest<TParams = Record<string, unknown>> {
|
|
826
|
+
method: string;
|
|
827
|
+
params?: TParams;
|
|
828
|
+
account_id?: string;
|
|
829
|
+
http_method?: string;
|
|
830
|
+
}
|
|
831
|
+
interface ConnectorExecuteResponse<TData = any> {
|
|
832
|
+
success: boolean;
|
|
833
|
+
data: TData;
|
|
834
|
+
}
|
|
835
|
+
interface ConnectorApiKeyRequest<TMetadata = Record<string, unknown>> {
|
|
836
|
+
api_key: string;
|
|
837
|
+
account_id?: string;
|
|
838
|
+
metadata?: TMetadata;
|
|
839
|
+
}
|
|
840
|
+
interface ConnectorApiKeyResponse {
|
|
841
|
+
success: boolean;
|
|
842
|
+
data: {
|
|
843
|
+
id: string;
|
|
844
|
+
account_id?: string;
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
interface BlinkConnectors {
|
|
848
|
+
status(provider: ConnectorProvider, options?: {
|
|
849
|
+
account_id?: string;
|
|
850
|
+
}): Promise<ConnectorStatusResponse>;
|
|
851
|
+
execute<TParams = Record<string, unknown>, TData = any>(provider: ConnectorProvider, request: ConnectorExecuteRequest<TParams>): Promise<ConnectorExecuteResponse<TData>>;
|
|
852
|
+
saveApiKey<TMetadata = Record<string, unknown>>(provider: ConnectorProvider, request: ConnectorApiKeyRequest<TMetadata>): Promise<ConnectorApiKeyResponse>;
|
|
853
|
+
}
|
|
854
|
+
declare class BlinkConnectorError extends BlinkError {
|
|
855
|
+
constructor(message: string, status?: number, details?: any);
|
|
856
|
+
}
|
|
857
|
+
|
|
810
858
|
/**
|
|
811
859
|
* HTTP client for Blink API requests
|
|
812
860
|
* Handles authentication, error handling, and request/response processing
|
|
@@ -997,6 +1045,13 @@ declare class HttpClient {
|
|
|
997
1045
|
dataScreenshot(projectId: string, request: ScreenshotRequest): Promise<BlinkResponse<ScreenshotResponse>>;
|
|
998
1046
|
dataFetch(projectId: string, request: FetchRequest): Promise<BlinkResponse<FetchResponse | AsyncFetchResponse>>;
|
|
999
1047
|
dataSearch(projectId: string, request: SearchRequest): Promise<BlinkResponse<SearchResponse>>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Connector requests
|
|
1050
|
+
*/
|
|
1051
|
+
private formatProviderForPath;
|
|
1052
|
+
connectorStatus(provider: ConnectorProvider): Promise<BlinkResponse<ConnectorStatusResponse>>;
|
|
1053
|
+
connectorExecute<TParams = Record<string, unknown>, TData = any>(provider: ConnectorProvider, request: ConnectorExecuteRequest<TParams>): Promise<BlinkResponse<ConnectorExecuteResponse<TData>>>;
|
|
1054
|
+
connectorSaveApiKey<TMetadata = Record<string, unknown>>(provider: ConnectorProvider, request: ConnectorApiKeyRequest<TMetadata>): Promise<BlinkResponse<ConnectorApiKeyResponse>>;
|
|
1000
1055
|
/**
|
|
1001
1056
|
* Realtime-specific requests
|
|
1002
1057
|
*/
|
|
@@ -1786,6 +1841,7 @@ interface BlinkClient {
|
|
|
1786
1841
|
realtime: BlinkRealtime;
|
|
1787
1842
|
notifications: BlinkNotifications;
|
|
1788
1843
|
analytics: BlinkAnalytics;
|
|
1844
|
+
connectors: BlinkConnectors;
|
|
1789
1845
|
functions: BlinkFunctions;
|
|
1790
1846
|
}
|
|
1791
1847
|
/**
|
|
@@ -2512,4 +2568,14 @@ declare class BlinkRealtimeImpl implements BlinkRealtime {
|
|
|
2512
2568
|
onPresence(channelName: string, callback: (users: PresenceUser[]) => void): () => void;
|
|
2513
2569
|
}
|
|
2514
2570
|
|
|
2515
|
-
|
|
2571
|
+
declare class BlinkConnectorsImpl implements BlinkConnectors {
|
|
2572
|
+
private httpClient;
|
|
2573
|
+
constructor(httpClient: HttpClient);
|
|
2574
|
+
status(provider: ConnectorProvider, options?: {
|
|
2575
|
+
account_id?: string;
|
|
2576
|
+
}): Promise<ConnectorStatusResponse>;
|
|
2577
|
+
execute<TParams = Record<string, unknown>, TData = any>(provider: ConnectorProvider, request: ConnectorExecuteRequest<TParams>): Promise<ConnectorExecuteResponse<TData>>;
|
|
2578
|
+
saveApiKey<TMetadata = Record<string, unknown>>(provider: ConnectorProvider, request: ConnectorApiKeyRequest<TMetadata>): Promise<ConnectorApiKeyResponse>;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
export { type AnalyticsEvent, AsyncStorageAdapter, type AuthState, type AuthStateChangeCallback, type AuthTokens, type BlinkAI, BlinkAIImpl, type BlinkAnalytics, BlinkAnalyticsImpl, type BlinkClient, type BlinkClientConfig, BlinkConnectorError, type BlinkConnectors, BlinkConnectorsImpl, type BlinkData, BlinkDataImpl, BlinkDatabase, type BlinkRealtime, BlinkRealtimeChannel, BlinkRealtimeError, BlinkRealtimeImpl, type BlinkStorage, BlinkStorageImpl, BlinkTable, type BlinkUser, type ConnectorApiKeyRequest, type ConnectorApiKeyResponse, type ConnectorAuthMode, type ConnectorExecuteRequest, type ConnectorExecuteResponse, type ConnectorProvider, type ConnectorStatusResponse, type CreateOptions, type DataExtraction, type FileObject, type FilterCondition, type ImageGenerationRequest, type ImageGenerationResponse, type Message, NoOpStorageAdapter, type ObjectGenerationRequest, type ObjectGenerationResponse, type PresenceUser, type QueryOptions, type RealtimeChannel, type RealtimeGetMessagesOptions, type RealtimeMessage, type RealtimePublishOptions, type RealtimeSubscribeOptions, type SearchRequest, type SearchResponse, type SpeechGenerationRequest, type SpeechGenerationResponse, type StorageAdapter, type StorageUploadOptions, type StorageUploadResponse, type TableOperations, type TextGenerationRequest, type TextGenerationResponse, type TokenUsage, type TranscriptionRequest, type TranscriptionResponse, type UpdateOptions, type UpsertOptions, type WebBrowserModule, WebStorageAdapter, createClient, getDefaultStorageAdapter, isBrowser, isDeno, isNode, isReactNative, isServer, isWeb, platform };
|
package/dist/index.d.ts
CHANGED
|
@@ -807,6 +807,54 @@ interface BlinkNotifications {
|
|
|
807
807
|
email(params: SendEmailRequest): Promise<SendEmailResponse>;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
+
type ConnectorProvider = 'discord' | 'notion' | 'google_drive' | 'google_calendar' | 'ai';
|
|
811
|
+
type ConnectorAuthMode = 'oauth' | 'api_key' | 'blink_managed' | 'hybrid';
|
|
812
|
+
interface ConnectorStatusData {
|
|
813
|
+
connected: boolean;
|
|
814
|
+
provider: ConnectorProvider;
|
|
815
|
+
auth_mode?: ConnectorAuthMode;
|
|
816
|
+
account_id?: string;
|
|
817
|
+
metadata?: Record<string, unknown>;
|
|
818
|
+
expires_at?: any;
|
|
819
|
+
scopes?: string[];
|
|
820
|
+
}
|
|
821
|
+
interface ConnectorStatusResponse {
|
|
822
|
+
success: boolean;
|
|
823
|
+
data: ConnectorStatusData;
|
|
824
|
+
}
|
|
825
|
+
interface ConnectorExecuteRequest<TParams = Record<string, unknown>> {
|
|
826
|
+
method: string;
|
|
827
|
+
params?: TParams;
|
|
828
|
+
account_id?: string;
|
|
829
|
+
http_method?: string;
|
|
830
|
+
}
|
|
831
|
+
interface ConnectorExecuteResponse<TData = any> {
|
|
832
|
+
success: boolean;
|
|
833
|
+
data: TData;
|
|
834
|
+
}
|
|
835
|
+
interface ConnectorApiKeyRequest<TMetadata = Record<string, unknown>> {
|
|
836
|
+
api_key: string;
|
|
837
|
+
account_id?: string;
|
|
838
|
+
metadata?: TMetadata;
|
|
839
|
+
}
|
|
840
|
+
interface ConnectorApiKeyResponse {
|
|
841
|
+
success: boolean;
|
|
842
|
+
data: {
|
|
843
|
+
id: string;
|
|
844
|
+
account_id?: string;
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
interface BlinkConnectors {
|
|
848
|
+
status(provider: ConnectorProvider, options?: {
|
|
849
|
+
account_id?: string;
|
|
850
|
+
}): Promise<ConnectorStatusResponse>;
|
|
851
|
+
execute<TParams = Record<string, unknown>, TData = any>(provider: ConnectorProvider, request: ConnectorExecuteRequest<TParams>): Promise<ConnectorExecuteResponse<TData>>;
|
|
852
|
+
saveApiKey<TMetadata = Record<string, unknown>>(provider: ConnectorProvider, request: ConnectorApiKeyRequest<TMetadata>): Promise<ConnectorApiKeyResponse>;
|
|
853
|
+
}
|
|
854
|
+
declare class BlinkConnectorError extends BlinkError {
|
|
855
|
+
constructor(message: string, status?: number, details?: any);
|
|
856
|
+
}
|
|
857
|
+
|
|
810
858
|
/**
|
|
811
859
|
* HTTP client for Blink API requests
|
|
812
860
|
* Handles authentication, error handling, and request/response processing
|
|
@@ -997,6 +1045,13 @@ declare class HttpClient {
|
|
|
997
1045
|
dataScreenshot(projectId: string, request: ScreenshotRequest): Promise<BlinkResponse<ScreenshotResponse>>;
|
|
998
1046
|
dataFetch(projectId: string, request: FetchRequest): Promise<BlinkResponse<FetchResponse | AsyncFetchResponse>>;
|
|
999
1047
|
dataSearch(projectId: string, request: SearchRequest): Promise<BlinkResponse<SearchResponse>>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Connector requests
|
|
1050
|
+
*/
|
|
1051
|
+
private formatProviderForPath;
|
|
1052
|
+
connectorStatus(provider: ConnectorProvider): Promise<BlinkResponse<ConnectorStatusResponse>>;
|
|
1053
|
+
connectorExecute<TParams = Record<string, unknown>, TData = any>(provider: ConnectorProvider, request: ConnectorExecuteRequest<TParams>): Promise<BlinkResponse<ConnectorExecuteResponse<TData>>>;
|
|
1054
|
+
connectorSaveApiKey<TMetadata = Record<string, unknown>>(provider: ConnectorProvider, request: ConnectorApiKeyRequest<TMetadata>): Promise<BlinkResponse<ConnectorApiKeyResponse>>;
|
|
1000
1055
|
/**
|
|
1001
1056
|
* Realtime-specific requests
|
|
1002
1057
|
*/
|
|
@@ -1786,6 +1841,7 @@ interface BlinkClient {
|
|
|
1786
1841
|
realtime: BlinkRealtime;
|
|
1787
1842
|
notifications: BlinkNotifications;
|
|
1788
1843
|
analytics: BlinkAnalytics;
|
|
1844
|
+
connectors: BlinkConnectors;
|
|
1789
1845
|
functions: BlinkFunctions;
|
|
1790
1846
|
}
|
|
1791
1847
|
/**
|
|
@@ -2512,4 +2568,14 @@ declare class BlinkRealtimeImpl implements BlinkRealtime {
|
|
|
2512
2568
|
onPresence(channelName: string, callback: (users: PresenceUser[]) => void): () => void;
|
|
2513
2569
|
}
|
|
2514
2570
|
|
|
2515
|
-
|
|
2571
|
+
declare class BlinkConnectorsImpl implements BlinkConnectors {
|
|
2572
|
+
private httpClient;
|
|
2573
|
+
constructor(httpClient: HttpClient);
|
|
2574
|
+
status(provider: ConnectorProvider, options?: {
|
|
2575
|
+
account_id?: string;
|
|
2576
|
+
}): Promise<ConnectorStatusResponse>;
|
|
2577
|
+
execute<TParams = Record<string, unknown>, TData = any>(provider: ConnectorProvider, request: ConnectorExecuteRequest<TParams>): Promise<ConnectorExecuteResponse<TData>>;
|
|
2578
|
+
saveApiKey<TMetadata = Record<string, unknown>>(provider: ConnectorProvider, request: ConnectorApiKeyRequest<TMetadata>): Promise<ConnectorApiKeyResponse>;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
export { type AnalyticsEvent, AsyncStorageAdapter, type AuthState, type AuthStateChangeCallback, type AuthTokens, type BlinkAI, BlinkAIImpl, type BlinkAnalytics, BlinkAnalyticsImpl, type BlinkClient, type BlinkClientConfig, BlinkConnectorError, type BlinkConnectors, BlinkConnectorsImpl, type BlinkData, BlinkDataImpl, BlinkDatabase, type BlinkRealtime, BlinkRealtimeChannel, BlinkRealtimeError, BlinkRealtimeImpl, type BlinkStorage, BlinkStorageImpl, BlinkTable, type BlinkUser, type ConnectorApiKeyRequest, type ConnectorApiKeyResponse, type ConnectorAuthMode, type ConnectorExecuteRequest, type ConnectorExecuteResponse, type ConnectorProvider, type ConnectorStatusResponse, type CreateOptions, type DataExtraction, type FileObject, type FilterCondition, type ImageGenerationRequest, type ImageGenerationResponse, type Message, NoOpStorageAdapter, type ObjectGenerationRequest, type ObjectGenerationResponse, type PresenceUser, type QueryOptions, type RealtimeChannel, type RealtimeGetMessagesOptions, type RealtimeMessage, type RealtimePublishOptions, type RealtimeSubscribeOptions, type SearchRequest, type SearchResponse, type SpeechGenerationRequest, type SpeechGenerationResponse, type StorageAdapter, type StorageUploadOptions, type StorageUploadResponse, type TableOperations, type TextGenerationRequest, type TextGenerationResponse, type TokenUsage, type TranscriptionRequest, type TranscriptionResponse, type UpdateOptions, type UpsertOptions, type WebBrowserModule, WebStorageAdapter, createClient, getDefaultStorageAdapter, isBrowser, isDeno, isNode, isReactNative, isServer, isWeb, platform };
|
package/dist/index.js
CHANGED
|
@@ -937,6 +937,38 @@ var HttpClient = class {
|
|
|
937
937
|
async dataSearch(projectId, request) {
|
|
938
938
|
return this.post(`/api/data/${projectId}/search`, request);
|
|
939
939
|
}
|
|
940
|
+
/**
|
|
941
|
+
* Connector requests
|
|
942
|
+
*/
|
|
943
|
+
formatProviderForPath(provider) {
|
|
944
|
+
return provider.replace("_", "-");
|
|
945
|
+
}
|
|
946
|
+
async connectorStatus(provider) {
|
|
947
|
+
return this.request(`/api/connectors/${this.formatProviderForPath(provider)}/${this.projectId}/status`, {
|
|
948
|
+
method: "GET"
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
async connectorExecute(provider, request) {
|
|
952
|
+
const path = request.method.startsWith("/") ? request.method : `/${request.method}`;
|
|
953
|
+
const url = `/api/connectors/${this.formatProviderForPath(provider)}/${this.projectId}${path}`;
|
|
954
|
+
const method = (request.http_method || "GET").toUpperCase();
|
|
955
|
+
if (method === "GET") {
|
|
956
|
+
return this.request(url, {
|
|
957
|
+
method: "GET",
|
|
958
|
+
searchParams: request.params
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
return this.request(url, {
|
|
962
|
+
method,
|
|
963
|
+
body: request.params || {}
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
async connectorSaveApiKey(provider, request) {
|
|
967
|
+
return this.request(`/api/connectors/${this.formatProviderForPath(provider)}/${this.projectId}/api-key`, {
|
|
968
|
+
method: "POST",
|
|
969
|
+
body: request
|
|
970
|
+
});
|
|
971
|
+
}
|
|
940
972
|
/**
|
|
941
973
|
* Realtime-specific requests
|
|
942
974
|
*/
|
|
@@ -5663,6 +5695,25 @@ var BlinkAnalyticsImpl = class {
|
|
|
5663
5695
|
}
|
|
5664
5696
|
};
|
|
5665
5697
|
|
|
5698
|
+
// src/connectors.ts
|
|
5699
|
+
var BlinkConnectorsImpl = class {
|
|
5700
|
+
constructor(httpClient) {
|
|
5701
|
+
this.httpClient = httpClient;
|
|
5702
|
+
}
|
|
5703
|
+
async status(provider, options) {
|
|
5704
|
+
const response = await this.httpClient.connectorStatus(provider);
|
|
5705
|
+
return response.data;
|
|
5706
|
+
}
|
|
5707
|
+
async execute(provider, request) {
|
|
5708
|
+
const response = await this.httpClient.connectorExecute(provider, request);
|
|
5709
|
+
return response.data;
|
|
5710
|
+
}
|
|
5711
|
+
async saveApiKey(provider, request) {
|
|
5712
|
+
const response = await this.httpClient.connectorSaveApiKey(provider, request);
|
|
5713
|
+
return response.data;
|
|
5714
|
+
}
|
|
5715
|
+
};
|
|
5716
|
+
|
|
5666
5717
|
// src/functions.ts
|
|
5667
5718
|
var BlinkFunctionsImpl = class {
|
|
5668
5719
|
httpClient;
|
|
@@ -5712,6 +5763,7 @@ var BlinkClientImpl = class {
|
|
|
5712
5763
|
realtime;
|
|
5713
5764
|
notifications;
|
|
5714
5765
|
analytics;
|
|
5766
|
+
connectors;
|
|
5715
5767
|
functions;
|
|
5716
5768
|
httpClient;
|
|
5717
5769
|
constructor(config) {
|
|
@@ -5731,6 +5783,7 @@ var BlinkClientImpl = class {
|
|
|
5731
5783
|
this.realtime = new BlinkRealtimeImpl(this.httpClient, config.projectId);
|
|
5732
5784
|
this.notifications = new BlinkNotificationsImpl(this.httpClient);
|
|
5733
5785
|
this.analytics = new BlinkAnalyticsImpl(this.httpClient, config.projectId);
|
|
5786
|
+
this.connectors = new BlinkConnectorsImpl(this.httpClient);
|
|
5734
5787
|
this.functions = new BlinkFunctionsImpl(
|
|
5735
5788
|
this.httpClient,
|
|
5736
5789
|
config.projectId,
|
|
@@ -5757,6 +5810,7 @@ function createClient(config) {
|
|
|
5757
5810
|
exports.AsyncStorageAdapter = AsyncStorageAdapter;
|
|
5758
5811
|
exports.BlinkAIImpl = BlinkAIImpl;
|
|
5759
5812
|
exports.BlinkAnalyticsImpl = BlinkAnalyticsImpl;
|
|
5813
|
+
exports.BlinkConnectorsImpl = BlinkConnectorsImpl;
|
|
5760
5814
|
exports.BlinkDataImpl = BlinkDataImpl;
|
|
5761
5815
|
exports.BlinkDatabase = BlinkDatabase;
|
|
5762
5816
|
exports.BlinkRealtimeChannel = BlinkRealtimeChannel;
|
package/dist/index.mjs
CHANGED
|
@@ -935,6 +935,38 @@ var HttpClient = class {
|
|
|
935
935
|
async dataSearch(projectId, request) {
|
|
936
936
|
return this.post(`/api/data/${projectId}/search`, request);
|
|
937
937
|
}
|
|
938
|
+
/**
|
|
939
|
+
* Connector requests
|
|
940
|
+
*/
|
|
941
|
+
formatProviderForPath(provider) {
|
|
942
|
+
return provider.replace("_", "-");
|
|
943
|
+
}
|
|
944
|
+
async connectorStatus(provider) {
|
|
945
|
+
return this.request(`/api/connectors/${this.formatProviderForPath(provider)}/${this.projectId}/status`, {
|
|
946
|
+
method: "GET"
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
async connectorExecute(provider, request) {
|
|
950
|
+
const path = request.method.startsWith("/") ? request.method : `/${request.method}`;
|
|
951
|
+
const url = `/api/connectors/${this.formatProviderForPath(provider)}/${this.projectId}${path}`;
|
|
952
|
+
const method = (request.http_method || "GET").toUpperCase();
|
|
953
|
+
if (method === "GET") {
|
|
954
|
+
return this.request(url, {
|
|
955
|
+
method: "GET",
|
|
956
|
+
searchParams: request.params
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
return this.request(url, {
|
|
960
|
+
method,
|
|
961
|
+
body: request.params || {}
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
async connectorSaveApiKey(provider, request) {
|
|
965
|
+
return this.request(`/api/connectors/${this.formatProviderForPath(provider)}/${this.projectId}/api-key`, {
|
|
966
|
+
method: "POST",
|
|
967
|
+
body: request
|
|
968
|
+
});
|
|
969
|
+
}
|
|
938
970
|
/**
|
|
939
971
|
* Realtime-specific requests
|
|
940
972
|
*/
|
|
@@ -5661,6 +5693,25 @@ var BlinkAnalyticsImpl = class {
|
|
|
5661
5693
|
}
|
|
5662
5694
|
};
|
|
5663
5695
|
|
|
5696
|
+
// src/connectors.ts
|
|
5697
|
+
var BlinkConnectorsImpl = class {
|
|
5698
|
+
constructor(httpClient) {
|
|
5699
|
+
this.httpClient = httpClient;
|
|
5700
|
+
}
|
|
5701
|
+
async status(provider, options) {
|
|
5702
|
+
const response = await this.httpClient.connectorStatus(provider);
|
|
5703
|
+
return response.data;
|
|
5704
|
+
}
|
|
5705
|
+
async execute(provider, request) {
|
|
5706
|
+
const response = await this.httpClient.connectorExecute(provider, request);
|
|
5707
|
+
return response.data;
|
|
5708
|
+
}
|
|
5709
|
+
async saveApiKey(provider, request) {
|
|
5710
|
+
const response = await this.httpClient.connectorSaveApiKey(provider, request);
|
|
5711
|
+
return response.data;
|
|
5712
|
+
}
|
|
5713
|
+
};
|
|
5714
|
+
|
|
5664
5715
|
// src/functions.ts
|
|
5665
5716
|
var BlinkFunctionsImpl = class {
|
|
5666
5717
|
httpClient;
|
|
@@ -5710,6 +5761,7 @@ var BlinkClientImpl = class {
|
|
|
5710
5761
|
realtime;
|
|
5711
5762
|
notifications;
|
|
5712
5763
|
analytics;
|
|
5764
|
+
connectors;
|
|
5713
5765
|
functions;
|
|
5714
5766
|
httpClient;
|
|
5715
5767
|
constructor(config) {
|
|
@@ -5729,6 +5781,7 @@ var BlinkClientImpl = class {
|
|
|
5729
5781
|
this.realtime = new BlinkRealtimeImpl(this.httpClient, config.projectId);
|
|
5730
5782
|
this.notifications = new BlinkNotificationsImpl(this.httpClient);
|
|
5731
5783
|
this.analytics = new BlinkAnalyticsImpl(this.httpClient, config.projectId);
|
|
5784
|
+
this.connectors = new BlinkConnectorsImpl(this.httpClient);
|
|
5732
5785
|
this.functions = new BlinkFunctionsImpl(
|
|
5733
5786
|
this.httpClient,
|
|
5734
5787
|
config.projectId,
|
|
@@ -5752,6 +5805,6 @@ function createClient(config) {
|
|
|
5752
5805
|
return new BlinkClientImpl(config);
|
|
5753
5806
|
}
|
|
5754
5807
|
|
|
5755
|
-
export { AsyncStorageAdapter, BlinkAIImpl, BlinkAnalyticsImpl, BlinkDataImpl, BlinkDatabase, BlinkRealtimeChannel, BlinkRealtimeImpl, BlinkStorageImpl, BlinkTable, NoOpStorageAdapter, WebStorageAdapter, createClient, getDefaultStorageAdapter, isBrowser, isDeno, isNode, isReactNative, isServer, isWeb, platform };
|
|
5808
|
+
export { AsyncStorageAdapter, BlinkAIImpl, BlinkAnalyticsImpl, BlinkConnectorsImpl, BlinkDataImpl, BlinkDatabase, BlinkRealtimeChannel, BlinkRealtimeImpl, BlinkStorageImpl, BlinkTable, NoOpStorageAdapter, WebStorageAdapter, createClient, getDefaultStorageAdapter, isBrowser, isDeno, isNode, isReactNative, isServer, isWeb, platform };
|
|
5756
5809
|
//# sourceMappingURL=index.mjs.map
|
|
5757
5810
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blinkdotnew/sdk",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Blink TypeScript SDK for client-side applications - Zero-boilerplate CRUD + auth + AI + analytics + notifications for modern SaaS/AI apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blink",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@blink/core": "0.4.1",
|
|
55
55
|
"tsup": "^8.0.0",
|
|
56
|
-
"typescript": "^5.0.0"
|
|
56
|
+
"typescript": "^5.0.0",
|
|
57
|
+
"@blinkdotnew/dev-sdk": "workspace:*"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {},
|
|
59
60
|
"publishConfig": {
|