Skip to content

Commit facbdcd

Browse files
committed
various improvements (and fix test)
1 parent 2663c9a commit facbdcd

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

packages/sdk/src/browser/async.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { AsyncResponseManager } from "../shared/async.js";
2-
import type { AsyncResponseManagerOpts } from "../shared/async.js";
1+
import { AsyncResponseManager } from "../shared/async.ts";
2+
import type { AsyncResponseManagerOpts } from "../shared/async.ts";
33

44
export type BrowserAsyncResponseManagerOpts = {
55
apiHost: string;

packages/sdk/src/browser/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
// operations, like connecting accounts via Pipedream Connect. See the server/
55
// directory for the server client.
66

7-
import { BrowserAsyncResponseManager } from "./async.js";
7+
import { BrowserAsyncResponseManager } from "./async.ts";
88
import {
99
AccountsRequestResponse,
1010
BaseClient,
1111
GetAccountOpts,
1212
type ConnectTokenResponse,
13-
} from "../shared/index.js";
14-
export type * from "../shared/index.js";
13+
} from "../shared/index.ts";
14+
export type * from "../shared/index.ts";
1515

1616
/**
1717
* Options for creating a browser-side client. This is used to configure the

packages/sdk/src/shared/component.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,17 @@ export type V1Component<T extends ConfigurableProps = any> = { // eslint-disable
9494
version: string;
9595
configurable_props: T;
9696
};
97+
98+
export type V1DeployedComponent<T extends ConfigurableProps = any> = {
99+
id: string;
100+
owner_id: string;
101+
component_id: string;
102+
configurable_props: T;
103+
configured_props: ConfiguredProps<T>;
104+
active: boolean;
105+
created_at: number;
106+
updated_at: number;
107+
name: string;
108+
name_slug: string;
109+
callback_observations?: unknown;
110+
};

packages/sdk/src/shared/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import type {
33
AsyncResponse,
44
AsyncErrorResponse,
55
AsyncResponseManager,
6-
} from "./async.js";
7-
import type { V1Component } from "./component.js";
8-
export * from "./component.js";
9-
import { version as sdkVersion } from "../version.js";
6+
} from "./async.ts";
7+
import type { V1Component, V1DeployedComponent } from "./component.ts";
8+
export * from "./component.ts";
9+
import { version as sdkVersion } from "../version.ts";
1010

1111
type RequestInit = globalThis.RequestInit;
1212

@@ -642,7 +642,7 @@ export abstract class BaseClient {
642642
dynamic_props_id: opts.dynamicPropsId,
643643
webhook_url: opts.webhookUrl,
644644
}
645-
return await this.makeConnectRequestAsync("/triggers/deploy", {
645+
return await this.makeConnectRequestAsync<V1DeployedComponent>("/triggers/deploy", {
646646
method: "POST",
647647
body,
648648
});

0 commit comments

Comments
 (0)