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
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,10 @@ const response = await client.apps.list({
limit: 1,
q: "q",
sortKey: "name",
sortDirection: "asc"
sortDirection: "asc",
hasComponents: true,
hasActions: true,
hasTriggers: true
});
for await (const item of response) {
console.log(item);
Expand All @@ -503,7 +506,10 @@ let page = await client.apps.list({
limit: 1,
q: "q",
sortKey: "name",
sortDirection: "asc"
sortDirection: "asc",
hasComponents: true,
hasActions: true,
hasTriggers: true
});
while (page.hasNextPage()) {
page = page.getNextPage();
Expand Down
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.3.3",
"version": "2.3.4",
"private": false,
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
"type": "commonjs",
Expand Down
27 changes: 25 additions & 2 deletions src/api/resources/apps/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export class Apps {
* limit: 1,
* q: "q",
* sortKey: "name",
* sortDirection: "asc"
* sortDirection: "asc",
* hasComponents: true,
* hasActions: true,
* hasTriggers: true
* })
*/
public async list(
Expand All @@ -45,7 +48,18 @@ export class Apps {
): Promise<core.Page<Pipedream.App>> {
const list = core.HttpResponsePromise.interceptFunction(
async (request: Pipedream.AppsListRequest): Promise<core.WithRawResponse<Pipedream.ListAppsResponse>> => {
const { after, before, limit, q, sortKey, sortDirection, categoryIds } = request;
const {
after,
before,
limit,
q,
sortKey,
sortDirection,
categoryIds,
hasComponents,
hasActions,
hasTriggers,
} = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (after != null) {
_queryParams.after = after;
Expand Down Expand Up @@ -78,6 +92,15 @@ export class Apps {
_queryParams.category_ids = categoryIds;
}
}
if (hasComponents != null) {
_queryParams.has_components = hasComponents.toString();
}
if (hasActions != null) {
_queryParams.has_actions = hasActions.toString();
}
if (hasTriggers != null) {
_queryParams.has_triggers = hasTriggers.toString();
}
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({
Expand Down
11 changes: 10 additions & 1 deletion src/api/resources/apps/client/requests/AppsListRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import type * as Pipedream from "../../../../index.js";
* limit: 1,
* q: "q",
* sortKey: "name",
* sortDirection: "asc"
* sortDirection: "asc",
* hasComponents: true,
* hasActions: true,
* hasTriggers: true
* }
*/
export interface AppsListRequest {
Expand All @@ -28,4 +31,10 @@ export interface AppsListRequest {
sortDirection?: Pipedream.AppsListRequestSortDirection;
/** Only return apps in these categories */
categoryIds?: string | string[];
/** Filter to apps that have components (actions or triggers) */
hasComponents?: boolean;
/** Filter to apps that have actions */
hasActions?: boolean;
/** Filter to apps that have triggers */
hasTriggers?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ export interface CreateProjectOpts {
appName?: string;
/** Support email displayed to end users */
supportEmail?: string;
/** Send a test request to the upstream API when adding Connect accounts for key-based apps */
connectRequireKeyAuthTest?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ export interface UpdateProjectOpts {
appName?: string;
/** Support email displayed to end users */
supportEmail?: string;
/** Send a test request to the upstream API when adding Connect accounts for key-based apps */
connectRequireKeyAuthTest?: boolean;
}
2 changes: 2 additions & 0 deletions src/api/types/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ export interface Project {
appName?: string;
/** Support email configured for the project */
supportEmail?: string;
/** Send a test request to the upstream API when adding Connect accounts for key-based apps */
connectRequireKeyAuthTest?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ export const CreateProjectOpts: core.serialization.Schema<
name: core.serialization.string(),
appName: core.serialization.property("app_name", core.serialization.string().optional()),
supportEmail: core.serialization.property("support_email", core.serialization.string().optional()),
connectRequireKeyAuthTest: core.serialization.property(
"connect_require_key_auth_test",
core.serialization.boolean().optional(),
),
});

export declare namespace CreateProjectOpts {
export interface Raw {
name: string;
app_name?: string | null;
support_email?: string | null;
connect_require_key_auth_test?: boolean | null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ export const UpdateProjectOpts: core.serialization.Schema<
name: core.serialization.string().optional(),
appName: core.serialization.property("app_name", core.serialization.string().optional()),
supportEmail: core.serialization.property("support_email", core.serialization.string().optional()),
connectRequireKeyAuthTest: core.serialization.property(
"connect_require_key_auth_test",
core.serialization.boolean().optional(),
),
});

export declare namespace UpdateProjectOpts {
export interface Raw {
name?: string | null;
app_name?: string | null;
support_email?: string | null;
connect_require_key_auth_test?: boolean | null;
}
}
5 changes: 5 additions & 0 deletions src/serialization/types/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export const Project: core.serialization.ObjectSchema<serializers.Project.Raw, P
name: core.serialization.string(),
appName: core.serialization.property("app_name", core.serialization.string().optional()),
supportEmail: core.serialization.property("support_email", core.serialization.string().optional()),
connectRequireKeyAuthTest: core.serialization.property(
"connect_require_key_auth_test",
core.serialization.boolean().optional(),
),
});

export declare namespace Project {
Expand All @@ -18,5 +22,6 @@ export declare namespace Project {
name: string;
app_name?: string | null;
support_email?: string | null;
connect_require_key_auth_test?: boolean | null;
}
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "2.3.3";
export const SDK_VERSION = "2.3.4";