Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
408 changes: 406 additions & 2 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/sdk",
"version": "2.0.10",
"version": "2.0.11",
"private": false,
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
"type": "commonjs",
Expand Down
36 changes: 22 additions & 14 deletions src/api/resources/accounts/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ export class Accounts {
* @throws {@link Pipedream.TooManyRequestsError}
*
* @example
* await client.accounts.list()
* await client.accounts.list({
* externalUserId: "external_user_id",
* oauthAppId: "oauth_app_id",
* after: "after",
* before: "before",
* limit: 1,
* app: "app",
* includeCredentials: true
* })
*/
public async list(
request: Pipedream.AccountsListRequest = {},
Expand All @@ -64,11 +72,8 @@ export class Accounts {
async (
request: Pipedream.AccountsListRequest,
): Promise<core.WithRawResponse<Pipedream.ListAccountsResponse>> => {
const { app, externalUserId, oauthAppId, after, before, limit, includeCredentials } = request;
const { externalUserId, oauthAppId, after, before, limit, app, includeCredentials } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (app != null) {
_queryParams["app"] = app;
}
if (externalUserId != null) {
_queryParams["external_user_id"] = externalUserId;
}
Expand All @@ -84,6 +89,9 @@ export class Accounts {
if (limit != null) {
_queryParams["limit"] = limit.toString();
}
if (app != null) {
_queryParams["app"] = app;
}
if (includeCredentials != null) {
_queryParams["include_credentials"] = includeCredentials.toString();
}
Expand Down Expand Up @@ -158,11 +166,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?.pageInfo.endCursor != null &&
!(typeof response?.pageInfo.endCursor === "string" && response?.pageInfo.endCursor === ""),
getItems: (response) => response?.data ?? [],
loadPage: (response) => {
return list(core.setObjectProperty(request, "after", response?.pageInfo?.endCursor));
return list(core.setObjectProperty(request, "after", response?.pageInfo.endCursor));
},
});
}
Expand All @@ -177,6 +185,8 @@ export class Accounts {
*
* @example
* await client.accounts.create({
* externalUserId: "external_user_id",
* oauthAppId: "oauth_app_id",
* appSlug: "app_slug",
* cfmapJson: "cfmap_json",
* connectToken: "connect_token"
Expand All @@ -193,12 +203,8 @@ export class Accounts {
request: Pipedream.CreateAccountOpts,
requestOptions?: Accounts.RequestOptions,
): Promise<core.WithRawResponse<Pipedream.Account>> {
const { appId, externalUserId, oauthAppId, ..._body } = request;
const { externalUserId, oauthAppId, ..._body } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (appId != null) {
_queryParams["app_id"] = appId;
}

if (externalUserId != null) {
_queryParams["external_user_id"] = externalUserId;
}
Expand Down Expand Up @@ -290,7 +296,9 @@ export class Accounts {
* @throws {@link Pipedream.TooManyRequestsError}
*
* @example
* await client.accounts.retrieve("account_id")
* await client.accounts.retrieve("account_id", {
* includeCredentials: true
* })
*/
public retrieve(
accountId: string,
Expand Down
14 changes: 11 additions & 3 deletions src/api/resources/accounts/client/requests/AccountsListRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@

/**
* @example
* {}
* {
* externalUserId: "external_user_id",
* oauthAppId: "oauth_app_id",
* after: "after",
* before: "before",
* limit: 1,
* app: "app",
* includeCredentials: true
* }
*/
export interface AccountsListRequest {
/** The app slug or ID to filter accounts by. */
app?: string;
externalUserId?: string;
/** The OAuth app ID to filter by, if applicable */
oauthAppId?: string;
Expand All @@ -18,6 +24,8 @@ export interface AccountsListRequest {
before?: string;
/** The maximum number of results to return */
limit?: number;
/** The app slug or ID to filter accounts by. */
app?: string;
/** Whether to retrieve the account's credentials or not */
includeCredentials?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

/**
* @example
* {}
* {
* includeCredentials: true
* }
*/
export interface AccountsRetrieveRequest {
/** Whether to retrieve the account's credentials or not */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
/**
* @example
* {
* externalUserId: "external_user_id",
* oauthAppId: "oauth_app_id",
* appSlug: "app_slug",
* cfmapJson: "cfmap_json",
* connectToken: "connect_token"
* }
*/
export interface CreateAccountOpts {
/** The app slug or ID to filter accounts by. */
appId?: string;
externalUserId?: string;
/** The OAuth app ID to filter by, if applicable */
oauthAppId?: string;
Expand Down
14 changes: 10 additions & 4 deletions src/api/resources/actions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ export class Actions {
* @throws {@link Pipedream.TooManyRequestsError}
*
* @example
* await client.actions.list()
* await client.actions.list({
* after: "after",
* before: "before",
* limit: 1,
* q: "q",
* app: "app"
* })
*/
public async list(
request: Pipedream.ActionsListRequest = {},
Expand Down Expand Up @@ -152,11 +158,11 @@ export class Actions {
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
hasNextPage: (response) =>
response?.pageInfo?.endCursor != null &&
!(typeof response?.pageInfo?.endCursor === "string" && response?.pageInfo?.endCursor === ""),
response?.pageInfo.endCursor != null &&
!(typeof response?.pageInfo.endCursor === "string" && response?.pageInfo.endCursor === ""),
getItems: (response) => response?.data ?? [],
loadPage: (response) => {
return list(core.setObjectProperty(request, "after", response?.pageInfo?.endCursor));
return list(core.setObjectProperty(request, "after", response?.pageInfo.endCursor));
},
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

/**
* @example
* {}
* {
* after: "after",
* before: "before",
* limit: 1,
* q: "q",
* app: "app"
* }
*/
export interface ActionsListRequest {
/** The cursor to start from for pagination */
Expand Down
15 changes: 11 additions & 4 deletions src/api/resources/apps/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ export class Apps {
* @param {Apps.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.apps.list()
* await client.apps.list({
* after: "after",
* before: "before",
* limit: 1,
* q: "q",
* sortKey: "name",
* sortDirection: "asc"
* })
*/
public async list(
request: Pipedream.AppsListRequest = {},
Expand Down Expand Up @@ -157,11 +164,11 @@ export class Apps {
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
hasNextPage: (response) =>
response?.pageInfo?.endCursor != null &&
!(typeof response?.pageInfo?.endCursor === "string" && response?.pageInfo?.endCursor === ""),
response?.pageInfo.endCursor != null &&
!(typeof response?.pageInfo.endCursor === "string" && response?.pageInfo.endCursor === ""),
getItems: (response) => response?.data ?? [],
loadPage: (response) => {
return list(core.setObjectProperty(request, "after", response?.pageInfo?.endCursor));
return list(core.setObjectProperty(request, "after", response?.pageInfo.endCursor));
},
});
}
Expand Down
9 changes: 8 additions & 1 deletion src/api/resources/apps/client/requests/AppsListRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import * as Pipedream from "../../../../index.js";

/**
* @example
* {}
* {
* after: "after",
* before: "before",
* limit: 1,
* q: "q",
* sortKey: "name",
* sortDirection: "asc"
* }
*/
export interface AppsListRequest {
/** The cursor to start from for pagination */
Expand Down
15 changes: 11 additions & 4 deletions src/api/resources/components/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ export class Components {
* @throws {@link Pipedream.TooManyRequestsError}
*
* @example
* await client.components.list()
* await client.components.list({
* after: "after",
* before: "before",
* limit: 1,
* q: "q",
* app: "app",
* componentType: "trigger"
* })
*/
public async list(
request: Pipedream.ComponentsListRequest = {},
Expand Down Expand Up @@ -158,11 +165,11 @@ export class Components {
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
hasNextPage: (response) =>
response?.pageInfo?.endCursor != null &&
!(typeof response?.pageInfo?.endCursor === "string" && response?.pageInfo?.endCursor === ""),
response?.pageInfo.endCursor != null &&
!(typeof response?.pageInfo.endCursor === "string" && response?.pageInfo.endCursor === ""),
getItems: (response) => response?.data ?? [],
loadPage: (response) => {
return list(core.setObjectProperty(request, "after", response?.pageInfo?.endCursor));
return list(core.setObjectProperty(request, "after", response?.pageInfo.endCursor));
},
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import * as Pipedream from "../../../../index.js";

/**
* @example
* {}
* {
* after: "after",
* before: "before",
* limit: 1,
* q: "q",
* app: "app",
* componentType: "trigger"
* }
*/
export interface ComponentsListRequest {
/** The cursor to start from for pagination */
Expand Down
15 changes: 10 additions & 5 deletions src/api/resources/deployedTriggers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export class DeployedTriggers {
*
* @example
* await client.deployedTriggers.list({
* after: "after",
* before: "before",
* limit: 1,
* externalUserId: "external_user_id"
* })
*/
Expand Down Expand Up @@ -149,11 +152,11 @@ export class DeployedTriggers {
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
hasNextPage: (response) =>
response?.pageInfo?.endCursor != null &&
!(typeof response?.pageInfo?.endCursor === "string" && response?.pageInfo?.endCursor === ""),
response?.pageInfo.endCursor != null &&
!(typeof response?.pageInfo.endCursor === "string" && response?.pageInfo.endCursor === ""),
getItems: (response) => response?.data ?? [],
loadPage: (response) => {
return list(core.setObjectProperty(request, "after", response?.pageInfo?.endCursor));
return list(core.setObjectProperty(request, "after", response?.pageInfo.endCursor));
},
});
}
Expand Down Expand Up @@ -369,7 +372,8 @@ export class DeployedTriggers {
*
* @example
* await client.deployedTriggers.delete("trigger_id", {
* externalUserId: "external_user_id"
* externalUserId: "external_user_id",
* ignoreHookErrors: true
* })
*/
public delete(
Expand Down Expand Up @@ -461,7 +465,8 @@ export class DeployedTriggers {
*
* @example
* await client.deployedTriggers.listEvents("trigger_id", {
* externalUserId: "external_user_id"
* externalUserId: "external_user_id",
* n: 1
* })
*/
public listEvents(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/**
* @example
* {
* externalUserId: "external_user_id"
* externalUserId: "external_user_id",
* ignoreHookErrors: true
* }
*/
export interface DeployedTriggersDeleteRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/**
* @example
* {
* externalUserId: "external_user_id"
* externalUserId: "external_user_id",
* n: 1
* }
*/
export interface DeployedTriggersListEventsRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/**
* @example
* {
* after: "after",
* before: "before",
* limit: 1,
* externalUserId: "external_user_id"
* }
*/
Expand Down
Loading