You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/modules/connectors.ts
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,17 @@ export function createConnectorsModule(
19
19
appId: string
20
20
): ConnectorsModule{
21
21
return{
22
-
// Retrieve an OAuth access token for a specific external integration type
23
-
// @ts-expect-error Return type mismatch with interface - implementation returns object, interface expects string
22
+
/**
23
+
* Retrieve an OAuth access token for a specific external integration type.
24
+
* @deprecated Use getConnection(integrationType) and use the returned accessToken (and connectionConfig when needed) instead.
25
+
*/
26
+
// @ts-expect-error Return type mismatch with interface - implementation returns string, interface expects string but implementation is typed as ConnectorAccessTokenResponse
24
27
asyncgetAccessToken(
25
28
integrationType: ConnectorIntegrationType
26
29
): Promise<ConnectorAccessTokenResponse>{
30
+
console.warn(
31
+
"[Base44 SDK] connectors.getAccessToken() is deprecated. Use getConnection(integrationType) and use the returned accessToken instead."
* If you're working in a TypeScript project, you can generate types from your app's connector configurations to get autocomplete on integration type names when calling `getAccessToken()`. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
56
+
* If you're working in a TypeScript project, you can generate types from your app's connector configurations to get autocomplete on integration type names when calling `getConnection()`. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
56
57
*/
57
58
exportinterfaceConnectorsModule{
58
59
/**
59
60
* Retrieves an OAuth access token for a specific external integration type.
60
61
*
62
+
* @deprecated Use {@link getConnection} and use the returned `accessToken` (and `connectionConfig` when needed) instead.
63
+
*
61
64
* Returns the OAuth token string for an external service that an app builder
62
65
* has connected to. This token represents the connected app builder's account
63
66
* and can be used to make authenticated API calls to that external service on behalf of the app.
0 commit comments