diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 94ae6cff02d47..cc96845275bc7 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog +## [1.0.4] - 2024-11-15 + +### Changed + +- Improved the docs of the `getAccountById` method in the backend client to + clarify the behavior of the new argument. +- Fixed the exported `HTTPAuthType` enum so that it can be used by the consumers + of the SDK. + ## [1.0.3] - 2024-11-14 ### Added diff --git a/packages/sdk/package-lock.json b/packages/sdk/package-lock.json index 0d2ba982c6373..38bb8b1cd0052 100644 --- a/packages/sdk/package-lock.json +++ b/packages/sdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "@pipedream/sdk", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pipedream/sdk", - "version": "1.0.3", + "version": "1.0.4", "license": "SEE LICENSE IN LICENSE", "dependencies": { "simple-oauth2": "^5.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 33ad516fb8835..1f16f9048ebe4 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/sdk", - "version": "1.0.3", + "version": "1.0.4", "description": "Pipedream SDK", "main": "dist/server/index.js", "module": "dist/server/index.js", diff --git a/packages/sdk/src/server/index.ts b/packages/sdk/src/server/index.ts index cf88843f7df8f..e27aa70035729 100644 --- a/packages/sdk/src/server/index.ts +++ b/packages/sdk/src/server/index.ts @@ -53,7 +53,7 @@ export type BackendClientOpts = { /** * Different ways in which customers can authorize requests to HTTP endpoints */ -export const enum HTTPAuthType { +export enum HTTPAuthType { None = "none", StaticBearer = "static_bearer_token", OAuth = "oauth" @@ -140,7 +140,7 @@ export type ConnectTokenResponse = { /** * The types of authentication that Pipedream apps support. */ -export const enum AppAuthType { +export enum AppAuthType { OAuth = "oauth", Keys = "keys", None = "none", @@ -602,6 +602,7 @@ export class BackendClient { * Retrieves a specific account by ID. * * @param accountId - The ID of the account to retrieve. + * @param params - The query parameters for retrieving the account. * @returns A promise resolving to the account. * * @example @@ -609,6 +610,13 @@ export class BackendClient { * const account = await client.getAccountById("account-id"); * console.log(account); * ``` + * + * @example + * ```typescript + * const account = await client.getAccountById("account-id", { + * include_credentials: true, + * }); + * console.log(account.credentials); */ public getAccountById( accountId: string,