Skip to content

Commit 89c5840

Browse files
Project management endpoints (#293)
This change adds support for managing projects via the SDK. Users can now create, retrieve, update, and delete projects programmatically. --------- Co-authored-by: Jay Vercellone <jay@pipedream.com>
1 parent 9102f38 commit 89c5840

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1255
-68
lines changed

.fernignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@ reference.md
1818
MIGRATE.md
1919

2020
# Custom Pipedream client files
21+
src/api/resources/index.ts
22+
src/api/types/index.ts
23+
src/browser/index.ts
24+
src/index.ts
25+
src/wrapper
2126

2227
# Ideally, we shouldn't. But until Fern supports the changes that we've made we
2328
# have to override some parts.
29+
src/Client.ts
2430

2531
# Custom auth files
32+
src/core/auth/index.ts
33+
src/core/auth/ConnectTokenProvider.ts
34+
src/core/auth/StaticTokenProvider.ts
35+
src/core/auth/TokenProvider.ts
2636

2737
# Custom configuration props files
2838
src/api/types/ConfiguredProps.ts
@@ -45,3 +55,4 @@ src/api/resources/workflows/client/requests/InvokeWorkflowOpts.ts
4555
src/api/resources/workflows/client/Client.ts
4656
src/api/resources/workflows/client/index.ts
4757
src/api/resources/workflows/index.ts
58+
src/api/types/HTTPAuthType.ts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/sdk",
3-
"version": "2.3.2",
3+
"version": "2.3.3",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",

src/api/errors/BadRequestError.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
import type * as core from "../../core/index.js";
4+
import * as errors from "../../errors/index.js";
5+
6+
export class BadRequestError extends errors.PipedreamError {
7+
constructor(body?: unknown, rawResponse?: core.RawResponse) {
8+
super({
9+
message: "BadRequestError",
10+
statusCode: 400,
11+
body: body,
12+
rawResponse: rawResponse,
13+
});
14+
Object.setPrototypeOf(this, BadRequestError.prototype);
15+
}
16+
}

src/api/errors/NotFoundError.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
import type * as core from "../../core/index.js";
4+
import * as errors from "../../errors/index.js";
5+
6+
export class NotFoundError extends errors.PipedreamError {
7+
constructor(body?: unknown, rawResponse?: core.RawResponse) {
8+
super({
9+
message: "NotFoundError",
10+
statusCode: 404,
11+
body: body,
12+
rawResponse: rawResponse,
13+
});
14+
Object.setPrototypeOf(this, NotFoundError.prototype);
15+
}
16+
}

src/api/errors/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
export * from "./BadRequestError.js";
2+
export * from "./NotFoundError.js";
13
export * from "./TooManyRequestsError.js";

src/api/resources/accounts/client/Client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as Pipedream from "../../../index.js";
1010

1111
export declare namespace Accounts {
1212
export interface Options extends BaseClientOptions {
13-
token?: core.Supplier<core.BearerToken | undefined>;
13+
token?: core.Supplier<core.BearerToken>;
1414
}
1515

1616
export interface RequestOptions extends BaseRequestOptions {}

src/api/resources/actions/client/Client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as Pipedream from "../../../index.js";
1010

1111
export declare namespace Actions {
1212
export interface Options extends BaseClientOptions {
13-
token?: core.Supplier<core.BearerToken | undefined>;
13+
token?: core.Supplier<core.BearerToken>;
1414
}
1515

1616
export interface RequestOptions extends BaseRequestOptions {}
@@ -29,6 +29,7 @@ export class Actions {
2929
* @param {Pipedream.ActionsListRequest} request
3030
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
3131
*
32+
* @throws {@link Pipedream.BadRequestError}
3233
* @throws {@link Pipedream.TooManyRequestsError}
3334
*
3435
* @example
@@ -108,6 +109,8 @@ export class Actions {
108109
}
109110
if (_response.error.reason === "status-code") {
110111
switch (_response.error.statusCode) {
112+
case 400:
113+
throw new Pipedream.BadRequestError(_response.error.body, _response.rawResponse);
111114
case 429:
112115
throw new Pipedream.TooManyRequestsError(_response.error.body, _response.rawResponse);
113116
default:

src/api/resources/appCategories/client/Client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type * as Pipedream from "../../../index.js";
1010

1111
export declare namespace AppCategories {
1212
export interface Options extends BaseClientOptions {
13-
token?: core.Supplier<core.BearerToken | undefined>;
13+
token?: core.Supplier<core.BearerToken>;
1414
}
1515

1616
export interface RequestOptions extends BaseRequestOptions {}

src/api/resources/apps/client/Client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type * as Pipedream from "../../../index.js";
1010

1111
export declare namespace Apps {
1212
export interface Options extends BaseClientOptions {
13-
token?: core.Supplier<core.BearerToken | undefined>;
13+
token?: core.Supplier<core.BearerToken>;
1414
}
1515

1616
export interface RequestOptions extends BaseRequestOptions {}

src/api/resources/components/client/Client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as Pipedream from "../../../index.js";
1010

1111
export declare namespace Components {
1212
export interface Options extends BaseClientOptions {
13-
token?: core.Supplier<core.BearerToken | undefined>;
13+
token?: core.Supplier<core.BearerToken>;
1414
}
1515

1616
export interface RequestOptions extends BaseRequestOptions {}
@@ -29,6 +29,7 @@ export class Components {
2929
* @param {Pipedream.ComponentsListRequest} request
3030
* @param {Components.RequestOptions} requestOptions - Request-specific configuration.
3131
*
32+
* @throws {@link Pipedream.BadRequestError}
3233
* @throws {@link Pipedream.TooManyRequestsError}
3334
*
3435
* @example
@@ -115,6 +116,8 @@ export class Components {
115116
}
116117
if (_response.error.reason === "status-code") {
117118
switch (_response.error.statusCode) {
119+
case 400:
120+
throw new Pipedream.BadRequestError(_response.error.body, _response.rawResponse);
118121
case 429:
119122
throw new Pipedream.TooManyRequestsError(_response.error.body, _response.rawResponse);
120123
default:

0 commit comments

Comments
 (0)