Skip to content

🌿 Fern Regeneration -- August 13, 2025 #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const client = new PipedreamClient({
});
await client.actions.run({
id: "id",
externalUserId: "external_user_id",
external_user_id: "external_user_id",
});
```

Expand Down
6 changes: 3 additions & 3 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export declare namespace PipedreamClient {

export class PipedreamClient {
protected readonly _options: PipedreamClient.Options;
protected readonly _oauthTokenProvider: core.OAuthTokenProvider;
private readonly _oauthTokenProvider: core.OAuthTokenProvider;
protected _appCategories: AppCategories | undefined;
protected _apps: Apps | undefined;
protected _accounts: Accounts | undefined;
Expand All @@ -73,8 +73,8 @@ export class PipedreamClient {
"x-pd-environment": _options?.projectEnvironment,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@pipedream/sdk",
"X-Fern-SDK-Version": "2.0.0-rc.8",
"User-Agent": "@pipedream/sdk/2.0.0-rc.8",
"X-Fern-SDK-Version": "2.0.0",
"User-Agent": "@pipedream/sdk/2.0.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
62 changes: 21 additions & 41 deletions src/api/resources/accounts/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as environments from "../../../../environments.js";
import * as core from "../../../../core/index.js";
import * as Pipedream from "../../../index.js";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
import * as serializers from "../../../../serialization/index.js";
import * as errors from "../../../../errors/index.js";

export declare namespace Accounts {
Expand Down Expand Up @@ -60,7 +59,15 @@ export class Accounts {
async (
request: Pipedream.AccountsListRequest,
): Promise<core.WithRawResponse<Pipedream.ListAccountsResponse>> => {
const { appId, externalUserId, oauthAppId, after, before, limit, includeCredentials } = request;
const {
app_id: appId,
external_user_id: externalUserId,
oauth_app_id: oauthAppId,
after,
before,
limit,
include_credentials: includeCredentials,
} = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (appId != null) {
_queryParams["app_id"] = appId;
Expand Down Expand Up @@ -107,13 +114,7 @@ export class Accounts {
});
if (_response.ok) {
return {
data: serializers.ListAccountsResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
data: _response.body as Pipedream.ListAccountsResponse,
rawResponse: _response.rawResponse,
};
}
Expand Down Expand Up @@ -148,11 +149,11 @@ export class Accounts {
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
hasNextPage: (response) =>
response?.pageInfo?.endCursor != null &&
!(typeof response?.pageInfo?.endCursor === "string" && response?.pageInfo?.endCursor === ""),
response?.page_info?.end_cursor != null &&
!(typeof response?.page_info?.end_cursor === "string" && response?.page_info?.end_cursor === ""),
getItems: (response) => response?.data ?? [],
loadPage: (response) => {
return list(core.setObjectProperty(request, "after", response?.pageInfo?.endCursor));
return list(core.setObjectProperty(request, "after", response?.page_info?.end_cursor));
},
});
}
Expand All @@ -163,9 +164,9 @@ export class Accounts {
*
* @example
* await client.accounts.create({
* appSlug: "app_slug",
* cfmapJson: "cfmap_json",
* connectToken: "connect_token"
* app_slug: "app_slug",
* cfmap_json: "cfmap_json",
* connect_token: "connect_token"
* })
*/
public create(
Expand All @@ -179,7 +180,7 @@ export class Accounts {
request: Pipedream.CreateAccountOpts,
requestOptions?: Accounts.RequestOptions,
): Promise<core.WithRawResponse<Pipedream.Account>> {
const { appId, externalUserId, oauthAppId, ..._body } = request;
const { app_id: appId, external_user_id: externalUserId, oauth_app_id: oauthAppId, ..._body } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (appId != null) {
_queryParams["app_id"] = appId;
Expand Down Expand Up @@ -212,25 +213,13 @@ export class Accounts {
contentType: "application/json",
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
requestType: "json",
body: serializers.CreateAccountOpts.jsonOrThrow(_body, {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
}),
body: _body,
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
maxRetries: requestOptions?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return {
data: serializers.Account.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
rawResponse: _response.rawResponse,
};
return { data: _response.body as Pipedream.Account, rawResponse: _response.rawResponse };
}

if (_response.error.reason === "status-code") {
Expand Down Expand Up @@ -281,7 +270,7 @@ export class Accounts {
request: Pipedream.AccountsRetrieveRequest = {},
requestOptions?: Accounts.RequestOptions,
): Promise<core.WithRawResponse<Pipedream.Account>> {
const { includeCredentials } = request;
const { include_credentials: includeCredentials } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (includeCredentials != null) {
_queryParams["include_credentials"] = includeCredentials.toString();
Expand Down Expand Up @@ -309,16 +298,7 @@ export class Accounts {
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return {
data: serializers.Account.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
rawResponse: _response.rawResponse,
};
return { data: _response.body as Pipedream.Account, rawResponse: _response.rawResponse };
}

if (_response.error.reason === "status-code") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export interface AccountsListRequest {
/**
* The app slug or ID to filter accounts by.
*/
appId?: string;
externalUserId?: string;
app_id?: string;
external_user_id?: string;
/**
* The OAuth app ID to filter by, if applicable
*/
oauthAppId?: string;
oauth_app_id?: string;
/**
* The cursor to start from for pagination
*/
Expand All @@ -31,5 +31,5 @@ export interface AccountsListRequest {
/**
* Whether to retrieve the account's credentials or not
*/
includeCredentials?: boolean;
include_credentials?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export interface AccountsRetrieveRequest {
/**
* Whether to retrieve the account's credentials or not
*/
includeCredentials?: boolean;
include_credentials?: boolean;
}
18 changes: 9 additions & 9 deletions src/api/resources/accounts/client/requests/CreateAccountOpts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
/**
* @example
* {
* appSlug: "app_slug",
* cfmapJson: "cfmap_json",
* connectToken: "connect_token"
* app_slug: "app_slug",
* cfmap_json: "cfmap_json",
* connect_token: "connect_token"
* }
*/
export interface CreateAccountOpts {
/**
* The app slug or ID to filter accounts by.
*/
appId?: string;
externalUserId?: string;
app_id?: string;
external_user_id?: string;
/**
* The OAuth app ID to filter by, if applicable
*/
oauthAppId?: string;
oauth_app_id?: string;
/** The app slug for the account */
appSlug: string;
app_slug: string;
/** JSON string containing the custom fields mapping */
cfmapJson: string;
cfmap_json: string;
/** The connect token for authentication */
connectToken: string;
connect_token: string;
/** Optional name for the account */
name?: string;
}
Loading
Loading