Skip to content

Commit aee0092

Browse files
Make the type field required for props (#142)
All configurable props must have a non-empty `type` field. --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Jay Vercellone <jay@pipedream.com>
1 parent 18b36d6 commit aee0092

File tree

10 files changed

+158
-49
lines changed

10 files changed

+158
-49
lines changed

MIGRATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ incrementally without breaking your existing codebase. To do this, you can
844844
install the new SDK with an alias:
845845

846846
```bash
847-
npm install @pipedream/sdk-v2@npm:@pipedream/sdk@^2.0.0-rc.12 --save
847+
npm install @pipedream/sdk-v2@npm:@pipedream/sdk@^2.0.0-rc.13 --save
848848
```
849849

850850
Then, in your code, you can import the new SDK with the alias:

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.0.0-rc.12",
3+
"version": "2.0.0-rc.13",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ export class PipedreamClient {
7474
"x-pd-environment": _options?.projectEnvironment,
7575
"X-Fern-Language": "JavaScript",
7676
"X-Fern-SDK-Name": "@pipedream/sdk",
77-
"X-Fern-SDK-Version": "2.0.0-rc.12",
78-
"User-Agent": "@pipedream/sdk/2.0.0-rc.12",
77+
"X-Fern-SDK-Version": "2.0.0-rc.13",
78+
"User-Agent": "@pipedream/sdk/2.0.0-rc.13",
7979
"X-Fern-Runtime": core.RUNTIME.type,
8080
"X-Fern-Runtime-Version": core.RUNTIME.version,
8181
},

src/api/types/ConfigurableProp.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
import * as Pipedream from "../index.js";
6+
57
/**
68
* A configuration or input field for a component.
79
*/
810
export interface ConfigurableProp {
911
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
1012
name: string;
11-
type?: string;
13+
type: Pipedream.ConfigurablePropType;
1214
/** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
1315
label?: string;
1416
/** A description of the prop, shown to the user when configuring the component. */

src/api/types/ConfigurablePropType.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export type ConfigurablePropType =
6+
| "app"
7+
| "$.interface.apphook"
8+
| "$.interface.http"
9+
| "$.interface.timer"
10+
| "data_store"
11+
| "$.service.db"
12+
| "boolean"
13+
| "integer"
14+
| "object"
15+
| "any"
16+
| "string"
17+
| "$.airtable.baseId"
18+
| "$.airtable.tableId"
19+
| "$.airtable.viewId"
20+
| "$.airtable.fieldId"
21+
| "$.discord.channel"
22+
| "http_request"
23+
| "sql"
24+
| "alert"
25+
| "dir";
26+
export const ConfigurablePropType = {
27+
App: "app",
28+
InterfaceApphook: "$.interface.apphook",
29+
InterfaceHttp: "$.interface.http",
30+
InterfaceTimer: "$.interface.timer",
31+
DataStore: "data_store",
32+
ServiceDb: "$.service.db",
33+
Boolean: "boolean",
34+
Integer: "integer",
35+
Object: "object",
36+
Any: "any",
37+
String: "string",
38+
AirtableBaseId: "$.airtable.baseId",
39+
AirtableTableId: "$.airtable.tableId",
40+
AirtableViewId: "$.airtable.viewId",
41+
AirtableFieldId: "$.airtable.fieldId",
42+
DiscordChannel: "$.discord.channel",
43+
HttpRequest: "http_request",
44+
Sql: "sql",
45+
Alert: "alert",
46+
Dir: "dir",
47+
} as const;

src/api/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export * from "./ConfigurablePropTimer.js";
3434
export * from "./ConfigurablePropTimerDefault.js";
3535
export * from "./ConfigurablePropTimerOption.js";
3636
export * from "./ConfigurablePropTimerStatic.js";
37+
export * from "./ConfigurablePropType.js";
3738
export * from "./ConfiguredProps.js";
3839
export * from "./ConfiguredPropValue.js";
3940
export * from "./ConfiguredPropValueAny.js";

src/serialization/types/ConfigurableProp.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
import * as serializers from "../index.js";
66
import * as Pipedream from "../../api/index.js";
77
import * as core from "../../core/index.js";
8+
import { ConfigurablePropType } from "./ConfigurablePropType.js";
89

910
export const ConfigurableProp: core.serialization.ObjectSchema<
1011
serializers.ConfigurableProp.Raw,
1112
Pipedream.ConfigurableProp
1213
> = core.serialization.object({
1314
name: core.serialization.string(),
14-
type: core.serialization.string().optional(),
15+
type: ConfigurablePropType,
1516
label: core.serialization.string().optional(),
1617
description: core.serialization.string().optional(),
1718
optional: core.serialization.boolean().optional(),
@@ -26,7 +27,7 @@ export const ConfigurableProp: core.serialization.ObjectSchema<
2627
export declare namespace ConfigurableProp {
2728
export interface Raw {
2829
name: string;
29-
type?: string | null;
30+
type: ConfigurablePropType.Raw;
3031
label?: string | null;
3132
description?: string | null;
3233
optional?: boolean | null;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as serializers from "../index.js";
6+
import * as Pipedream from "../../api/index.js";
7+
import * as core from "../../core/index.js";
8+
9+
export const ConfigurablePropType: core.serialization.Schema<
10+
serializers.ConfigurablePropType.Raw,
11+
Pipedream.ConfigurablePropType
12+
> = core.serialization.enum_([
13+
"app",
14+
"$.interface.apphook",
15+
"$.interface.http",
16+
"$.interface.timer",
17+
"data_store",
18+
"$.service.db",
19+
"boolean",
20+
"integer",
21+
"object",
22+
"any",
23+
"string",
24+
"$.airtable.baseId",
25+
"$.airtable.tableId",
26+
"$.airtable.viewId",
27+
"$.airtable.fieldId",
28+
"$.discord.channel",
29+
"http_request",
30+
"sql",
31+
"alert",
32+
"dir",
33+
]);
34+
35+
export declare namespace ConfigurablePropType {
36+
export type Raw =
37+
| "app"
38+
| "$.interface.apphook"
39+
| "$.interface.http"
40+
| "$.interface.timer"
41+
| "data_store"
42+
| "$.service.db"
43+
| "boolean"
44+
| "integer"
45+
| "object"
46+
| "any"
47+
| "string"
48+
| "$.airtable.baseId"
49+
| "$.airtable.tableId"
50+
| "$.airtable.viewId"
51+
| "$.airtable.fieldId"
52+
| "$.discord.channel"
53+
| "http_request"
54+
| "sql"
55+
| "alert"
56+
| "dir";
57+
}

src/serialization/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export * from "./Component.js";
99
export * from "./ComponentStash.js";
1010
export * from "./TimerInterval.js";
1111
export * from "./TimerCron.js";
12+
export * from "./ConfigurablePropType.js";
1213
export * from "./ConfigurableProp.js";
1314
export * from "./ConfigurablePropAlert.js";
1415
export * from "./ConfigurablePropAlertType.js";

yarn.lock

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
# yarn lockfile v1
33

44

5-
"@ampproject/remapping@^2.2.0":
6-
version "2.3.0"
7-
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4"
8-
integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==
9-
dependencies:
10-
"@jridgewell/gen-mapping" "^0.3.5"
11-
"@jridgewell/trace-mapping" "^0.3.24"
12-
135
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1":
146
version "7.27.1"
157
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be"
@@ -20,25 +12,25 @@
2012
picocolors "^1.1.1"
2113

2214
"@babel/compat-data@^7.27.2":
23-
version "7.28.0"
24-
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.0.tgz#9fc6fd58c2a6a15243cd13983224968392070790"
25-
integrity sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==
15+
version "7.28.4"
16+
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.4.tgz#96fdf1af1b8859c8474ab39c295312bfb7c24b04"
17+
integrity sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==
2618

2719
"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9":
28-
version "7.28.3"
29-
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.3.tgz#aceddde69c5d1def69b839d09efa3e3ff59c97cb"
30-
integrity sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==
20+
version "7.28.4"
21+
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.4.tgz#12a550b8794452df4c8b084f95003bce1742d496"
22+
integrity sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==
3123
dependencies:
32-
"@ampproject/remapping" "^2.2.0"
3324
"@babel/code-frame" "^7.27.1"
3425
"@babel/generator" "^7.28.3"
3526
"@babel/helper-compilation-targets" "^7.27.2"
3627
"@babel/helper-module-transforms" "^7.28.3"
37-
"@babel/helpers" "^7.28.3"
38-
"@babel/parser" "^7.28.3"
28+
"@babel/helpers" "^7.28.4"
29+
"@babel/parser" "^7.28.4"
3930
"@babel/template" "^7.27.2"
40-
"@babel/traverse" "^7.28.3"
41-
"@babel/types" "^7.28.2"
31+
"@babel/traverse" "^7.28.4"
32+
"@babel/types" "^7.28.4"
33+
"@jridgewell/remapping" "^2.3.5"
4234
convert-source-map "^2.0.0"
4335
debug "^4.1.0"
4436
gensync "^1.0.0-beta.2"
@@ -109,20 +101,20 @@
109101
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f"
110102
integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==
111103

112-
"@babel/helpers@^7.28.3":
113-
version "7.28.3"
114-
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.3.tgz#b83156c0a2232c133d1b535dd5d3452119c7e441"
115-
integrity sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw==
104+
"@babel/helpers@^7.28.4":
105+
version "7.28.4"
106+
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827"
107+
integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==
116108
dependencies:
117109
"@babel/template" "^7.27.2"
118-
"@babel/types" "^7.28.2"
110+
"@babel/types" "^7.28.4"
119111

120-
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3":
121-
version "7.28.3"
122-
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.3.tgz#d2d25b814621bca5fe9d172bc93792547e7a2a71"
123-
integrity sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==
112+
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3", "@babel/parser@^7.28.4":
113+
version "7.28.4"
114+
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.4.tgz#da25d4643532890932cc03f7705fe19637e03fa8"
115+
integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==
124116
dependencies:
125-
"@babel/types" "^7.28.2"
117+
"@babel/types" "^7.28.4"
126118

127119
"@babel/plugin-syntax-async-generators@^7.8.4":
128120
version "7.8.4"
@@ -252,23 +244,23 @@
252244
"@babel/parser" "^7.27.2"
253245
"@babel/types" "^7.27.1"
254246

255-
"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3":
256-
version "7.28.3"
257-
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.3.tgz#6911a10795d2cce43ec6a28cffc440cca2593434"
258-
integrity sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==
247+
"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.4":
248+
version "7.28.4"
249+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.4.tgz#8d456101b96ab175d487249f60680221692b958b"
250+
integrity sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==
259251
dependencies:
260252
"@babel/code-frame" "^7.27.1"
261253
"@babel/generator" "^7.28.3"
262254
"@babel/helper-globals" "^7.28.0"
263-
"@babel/parser" "^7.28.3"
255+
"@babel/parser" "^7.28.4"
264256
"@babel/template" "^7.27.2"
265-
"@babel/types" "^7.28.2"
257+
"@babel/types" "^7.28.4"
266258
debug "^4.3.1"
267259

268-
"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.3.3":
269-
version "7.28.2"
270-
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.2.tgz#da9db0856a9a88e0a13b019881d7513588cf712b"
271-
integrity sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==
260+
"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.3.3":
261+
version "7.28.4"
262+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
263+
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
272264
dependencies:
273265
"@babel/helper-string-parser" "^7.27.1"
274266
"@babel/helper-validator-identifier" "^7.27.1"
@@ -540,6 +532,14 @@
540532
"@jridgewell/sourcemap-codec" "^1.5.0"
541533
"@jridgewell/trace-mapping" "^0.3.24"
542534

535+
"@jridgewell/remapping@^2.3.5":
536+
version "2.3.5"
537+
resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1"
538+
integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==
539+
dependencies:
540+
"@jridgewell/gen-mapping" "^0.3.5"
541+
"@jridgewell/trace-mapping" "^0.3.24"
542+
543543
"@jridgewell/resolve-uri@^3.1.0":
544544
version "3.1.2"
545545
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
@@ -2443,9 +2443,9 @@ node-int64@^0.4.0:
24432443
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
24442444

24452445
node-releases@^2.0.19:
2446-
version "2.0.19"
2447-
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314"
2448-
integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==
2446+
version "2.0.20"
2447+
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.20.tgz#e26bb79dbdd1e64a146df389c699014c611cbc27"
2448+
integrity sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA==
24492449

24502450
normalize-path@^3.0.0:
24512451
version "3.0.0"

0 commit comments

Comments
 (0)