@powerhousedao/pieces-framework 6.2.3-dev.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,308 @@
1
+ import { A as PropertyType, C as CheckboxProperty, M as TPropertyValue, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, _ as DateRangeProperty, h as MarkdownVariant, j as BasePropertySchema, k as ShortTextProperty, t as MarkDownProperty, w as StaticDropdownProperty, x as FileProperty } from "./markdown-property-Df2l6_y_.js";
2
+ import * as z from "zod/mini";
3
+
4
+ //#region upstream/framework/lib/action/action.ts
5
+ const ErrorHandlingOptionsParam = z.object({
6
+ retryOnFailure: z.object({
7
+ defaultValue: z.optional(z.boolean()),
8
+ hide: z.optional(z.boolean())
9
+ }),
10
+ continueOnFailure: z.object({
11
+ defaultValue: z.optional(z.boolean()),
12
+ hide: z.optional(z.boolean())
13
+ })
14
+ });
15
+ var IAction = class {
16
+ constructor(name, displayName, description, props, propertyGroups, run, test, requireAuth, errorHandlingOptions, outputSchema, audience, aiMetadata, classification) {
17
+ this.name = name;
18
+ this.displayName = displayName;
19
+ this.description = description;
20
+ this.props = props;
21
+ this.propertyGroups = propertyGroups;
22
+ this.run = run;
23
+ this.test = test;
24
+ this.requireAuth = requireAuth;
25
+ this.errorHandlingOptions = errorHandlingOptions;
26
+ this.outputSchema = outputSchema;
27
+ this.audience = audience;
28
+ this.aiMetadata = aiMetadata;
29
+ this.classification = classification;
30
+ }
31
+ };
32
+ const createAction = (params) => {
33
+ return new IAction(params.name, params.displayName, params.description, params.props, params.propertyGroups, params.run, params.test ?? params.run, params.requireAuth ?? true, params.errorHandlingOptions ?? {
34
+ continueOnFailure: { defaultValue: false },
35
+ retryOnFailure: { defaultValue: false }
36
+ }, params.outputSchema, params.audience, params.aiMetadata, params.classification);
37
+ };
38
+
39
+ //#endregion
40
+ //#region upstream/framework/lib/property/input/dropdown/dropdown-prop.ts
41
+ const DropdownProperty = z.object({
42
+ ...BasePropertySchema.shape,
43
+ ...TPropertyValue(z.unknown(), PropertyType.DROPDOWN).shape,
44
+ refreshers: z.array(z.string())
45
+ });
46
+ const MultiSelectDropdownProperty = z.object({
47
+ ...BasePropertySchema.shape,
48
+ ...TPropertyValue(z.array(z.unknown()), PropertyType.MULTI_SELECT_DROPDOWN).shape,
49
+ refreshers: z.array(z.string())
50
+ });
51
+
52
+ //#endregion
53
+ //#region upstream/framework/lib/property/input/json-property.ts
54
+ const JsonProperty = z.object({
55
+ ...BasePropertySchema.shape,
56
+ ...TPropertyValue(z.union([z.record(z.string(), z.unknown())]), PropertyType.JSON).shape
57
+ });
58
+
59
+ //#endregion
60
+ //#region upstream/framework/lib/property/input/color-property.ts
61
+ const ColorProperty = z.object({
62
+ ...BasePropertySchema.shape,
63
+ ...TPropertyValue(z.string(), PropertyType.COLOR).shape
64
+ });
65
+
66
+ //#endregion
67
+ //#region upstream/framework/lib/property/input/date-time-property.ts
68
+ const DateTimeProperty = z.object({
69
+ ...BasePropertySchema.shape,
70
+ ...TPropertyValue(z.string(), PropertyType.DATE_TIME).shape
71
+ });
72
+
73
+ //#endregion
74
+ //#region upstream/framework/lib/property/input/array-property.ts
75
+ const ArraySubProps = z.record(z.string(), z.union([
76
+ ShortTextProperty,
77
+ LongTextProperty,
78
+ StaticDropdownProperty,
79
+ MultiSelectDropdownProperty,
80
+ StaticMultiSelectDropdownProperty,
81
+ CheckboxProperty,
82
+ NumberProperty,
83
+ FileProperty,
84
+ JsonProperty,
85
+ ColorProperty,
86
+ DateTimeProperty
87
+ ]));
88
+ const ArrayProperty = z.object({
89
+ ...BasePropertySchema.shape,
90
+ properties: z.optional(ArraySubProps),
91
+ ...TPropertyValue(z.array(z.unknown()), PropertyType.ARRAY).shape
92
+ });
93
+
94
+ //#endregion
95
+ //#region upstream/framework/lib/property/input/dynamic-prop.ts
96
+ const DynamicProp = z.union([
97
+ ShortTextProperty,
98
+ StaticDropdownProperty,
99
+ JsonProperty,
100
+ ArrayProperty,
101
+ StaticMultiSelectDropdownProperty
102
+ ]);
103
+ const DynamicPropsValue = z.record(z.string(), DynamicProp);
104
+ const DynamicProperties = z.object({
105
+ refreshers: z.array(z.string()),
106
+ ...BasePropertySchema.shape,
107
+ ...TPropertyValue(z.unknown(), PropertyType.DYNAMIC).shape
108
+ });
109
+
110
+ //#endregion
111
+ //#region upstream/core-utils/lib/assertions.ts
112
+ function assertNotNullOrUndefined(value, fieldName) {
113
+ if (value === null || value === void 0) throw new Error(`${fieldName} is null or undefined`);
114
+ }
115
+ const isNotUndefined = (value) => {
116
+ return value !== void 0;
117
+ };
118
+
119
+ //#endregion
120
+ //#region upstream/framework/lib/property/input/object-property.ts
121
+ const ObjectProperty = z.object({
122
+ ...BasePropertySchema.shape,
123
+ ...TPropertyValue(z.record(z.string(), z.unknown()), PropertyType.OBJECT).shape
124
+ });
125
+
126
+ //#endregion
127
+ //#region upstream/framework/lib/property/input/rich-text-property.ts
128
+ const RichTextProperty = z.object({
129
+ ...BasePropertySchema.shape,
130
+ formatProperty: z.optional(z.string()),
131
+ ...TPropertyValue(z.string(), PropertyType.RICH_TEXT).shape
132
+ });
133
+
134
+ //#endregion
135
+ //#region upstream/framework/lib/property/input/custom-property.ts
136
+ const CustomProperty = z.object({
137
+ ...BasePropertySchema.shape,
138
+ ...TPropertyValue(z.unknown(), PropertyType.CUSTOM).shape,
139
+ code: z.string()
140
+ });
141
+
142
+ //#endregion
143
+ //#region upstream/framework/lib/property/input/index.ts
144
+ const InputProperty = z.union([
145
+ ShortTextProperty,
146
+ LongTextProperty,
147
+ RichTextProperty,
148
+ MarkDownProperty,
149
+ CheckboxProperty,
150
+ StaticDropdownProperty,
151
+ StaticMultiSelectDropdownProperty,
152
+ DropdownProperty,
153
+ MultiSelectDropdownProperty,
154
+ DynamicProperties,
155
+ NumberProperty,
156
+ ArrayProperty,
157
+ ObjectProperty,
158
+ JsonProperty,
159
+ DateTimeProperty,
160
+ DateRangeProperty,
161
+ FileProperty,
162
+ CustomProperty,
163
+ ColorProperty
164
+ ]);
165
+ const Property = {
166
+ ShortText(request) {
167
+ return {
168
+ ...request,
169
+ valueSchema: void 0,
170
+ type: PropertyType.SHORT_TEXT
171
+ };
172
+ },
173
+ Checkbox(request) {
174
+ return {
175
+ ...request,
176
+ valueSchema: void 0,
177
+ type: PropertyType.CHECKBOX
178
+ };
179
+ },
180
+ LongText(request) {
181
+ return {
182
+ ...request,
183
+ valueSchema: void 0,
184
+ type: PropertyType.LONG_TEXT
185
+ };
186
+ },
187
+ RichText(request) {
188
+ return {
189
+ ...request,
190
+ valueSchema: void 0,
191
+ type: PropertyType.RICH_TEXT
192
+ };
193
+ },
194
+ MarkDown(request) {
195
+ return {
196
+ displayName: "Markdown",
197
+ required: false,
198
+ description: request.value,
199
+ type: PropertyType.MARKDOWN,
200
+ valueSchema: void 0,
201
+ variant: request.variant ?? MarkdownVariant.INFO
202
+ };
203
+ },
204
+ Number(request) {
205
+ return {
206
+ ...request,
207
+ valueSchema: void 0,
208
+ type: PropertyType.NUMBER
209
+ };
210
+ },
211
+ Json(request) {
212
+ return {
213
+ ...request,
214
+ valueSchema: void 0,
215
+ type: PropertyType.JSON
216
+ };
217
+ },
218
+ Array(request) {
219
+ return {
220
+ ...request,
221
+ valueSchema: void 0,
222
+ type: PropertyType.ARRAY
223
+ };
224
+ },
225
+ Object(request) {
226
+ return {
227
+ ...request,
228
+ valueSchema: void 0,
229
+ type: PropertyType.OBJECT
230
+ };
231
+ },
232
+ Dropdown(request) {
233
+ return {
234
+ ...request,
235
+ valueSchema: void 0,
236
+ type: PropertyType.DROPDOWN
237
+ };
238
+ },
239
+ StaticDropdown(request) {
240
+ return {
241
+ ...request,
242
+ valueSchema: void 0,
243
+ type: PropertyType.STATIC_DROPDOWN
244
+ };
245
+ },
246
+ MultiSelectDropdown(request) {
247
+ return {
248
+ ...request,
249
+ valueSchema: void 0,
250
+ type: PropertyType.MULTI_SELECT_DROPDOWN
251
+ };
252
+ },
253
+ DynamicProperties(request) {
254
+ return {
255
+ ...request,
256
+ valueSchema: void 0,
257
+ type: PropertyType.DYNAMIC
258
+ };
259
+ },
260
+ StaticMultiSelectDropdown(request) {
261
+ return {
262
+ ...request,
263
+ valueSchema: void 0,
264
+ type: PropertyType.STATIC_MULTI_SELECT_DROPDOWN
265
+ };
266
+ },
267
+ DateTime(request) {
268
+ return {
269
+ ...request,
270
+ valueSchema: void 0,
271
+ type: PropertyType.DATE_TIME
272
+ };
273
+ },
274
+ DateRange(request) {
275
+ return {
276
+ ...request,
277
+ valueSchema: void 0,
278
+ type: PropertyType.DATE_RANGE
279
+ };
280
+ },
281
+ File(request) {
282
+ return {
283
+ ...request,
284
+ valueSchema: void 0,
285
+ type: PropertyType.FILE
286
+ };
287
+ },
288
+ Custom(request) {
289
+ const code = request.code.toString();
290
+ return {
291
+ ...request,
292
+ code,
293
+ valueSchema: void 0,
294
+ type: PropertyType.CUSTOM
295
+ };
296
+ },
297
+ Color(request) {
298
+ return {
299
+ ...request,
300
+ valueSchema: void 0,
301
+ type: PropertyType.COLOR
302
+ };
303
+ }
304
+ };
305
+
306
+ //#endregion
307
+ export { ErrorHandlingOptionsParam as _, ObjectProperty as a, DynamicProp as c, ArrayProperty as d, ArraySubProps as f, MultiSelectDropdownProperty as g, DropdownProperty as h, RichTextProperty as i, DynamicProperties as l, JsonProperty as m, Property as n, assertNotNullOrUndefined as o, DateTimeProperty as p, CustomProperty as r, isNotUndefined as s, InputProperty as t, DynamicPropsValue as u, IAction as v, createAction as y };
308
+ //# sourceMappingURL=input-COuhC1I-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-COuhC1I-.js","names":[],"sources":["../upstream/framework/lib/action/action.ts","../upstream/framework/lib/property/input/dropdown/dropdown-prop.ts","../upstream/framework/lib/property/input/json-property.ts","../upstream/framework/lib/property/input/color-property.ts","../upstream/framework/lib/property/input/date-time-property.ts","../upstream/framework/lib/property/input/array-property.ts","../upstream/framework/lib/property/input/dynamic-prop.ts","../upstream/core-utils/lib/assertions.ts","../upstream/framework/lib/property/input/object-property.ts","../upstream/framework/lib/property/input/rich-text-property.ts","../upstream/framework/lib/property/input/custom-property.ts","../upstream/framework/lib/property/input/index.ts"],"sourcesContent":["// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/action/action.ts. MIT; see ../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport type { ActionContext } from \"../context/index.js\";\nimport type { OutputSchema } from \"../output-schema.js\";\nimport type {\n ActionBase,\n Audience,\n AiMetadata,\n ActionClassification,\n PropertyGroup,\n} from \"../piece-metadata.js\";\nimport type { InputPropertyMap } from \"../property/index.js\";\nimport type {\n ExtractPieceAuthPropertyTypeForMethods,\n PieceAuthProperty,\n} from \"../property/authentication/index.js\";\n\nexport type ActionRunner<\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n PieceAuthProperty,\n ActionProps extends InputPropertyMap = InputPropertyMap,\n> = (ctx: ActionContext<PieceAuth, ActionProps>) => Promise<unknown | void>;\n\nexport const ErrorHandlingOptionsParam = z.object({\n retryOnFailure: z.object({\n defaultValue: z.optional(z.boolean()),\n hide: z.optional(z.boolean()),\n }),\n continueOnFailure: z.object({\n defaultValue: z.optional(z.boolean()),\n hide: z.optional(z.boolean()),\n }),\n});\nexport type ErrorHandlingOptionsParam = z.infer<\n typeof ErrorHandlingOptionsParam\n>;\n\ntype CreateActionParams<\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined,\n ActionProps extends InputPropertyMap,\n> = {\n /**\n * A dummy parameter used to infer {@code PieceAuth} type\n */\n name: string;\n /**\n * this parameter is used to infer the type of the piece auth value in run and test methods\n */\n auth?: PieceAuth;\n displayName: string;\n description: string;\n props: ActionProps;\n propertyGroups?: PropertyGroup[];\n run: ActionRunner<\n ExtractPieceAuthPropertyTypeForMethods<PieceAuth>,\n ActionProps\n >;\n test?: ActionRunner<\n ExtractPieceAuthPropertyTypeForMethods<PieceAuth>,\n ActionProps\n >;\n requireAuth?: boolean;\n errorHandlingOptions?: ErrorHandlingOptionsParam;\n outputSchema?: OutputSchema;\n audience?: Audience;\n aiMetadata?: AiMetadata;\n classification?: ActionClassification;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class IAction<\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined = any,\n ActionProps extends InputPropertyMap = InputPropertyMap,\n> implements ActionBase {\n constructor(\n public readonly name: string,\n public readonly displayName: string,\n public readonly description: string,\n public readonly props: ActionProps,\n public readonly propertyGroups: PropertyGroup[] | undefined,\n public readonly run: ActionRunner<\n ExtractPieceAuthPropertyTypeForMethods<PieceAuth>,\n ActionProps\n >,\n public readonly test: ActionRunner<\n ExtractPieceAuthPropertyTypeForMethods<PieceAuth>,\n ActionProps\n >,\n public readonly requireAuth: boolean,\n public readonly errorHandlingOptions: ErrorHandlingOptionsParam,\n public readonly outputSchema?: OutputSchema,\n public readonly audience?: Audience,\n public readonly aiMetadata?: AiMetadata,\n public readonly classification?: ActionClassification,\n ) {}\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type Action<\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined = any,\n ActionProps extends InputPropertyMap = any,\n> = IAction<PieceAuth, ActionProps>;\n\nexport const createAction = <\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n PieceAuthProperty,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ActionProps extends InputPropertyMap = any,\n>(\n params: CreateActionParams<PieceAuth, ActionProps>,\n) => {\n return new IAction(\n params.name,\n params.displayName,\n params.description,\n params.props,\n params.propertyGroups,\n params.run,\n params.test ?? params.run,\n params.requireAuth ?? true,\n params.errorHandlingOptions ?? {\n continueOnFailure: {\n defaultValue: false,\n },\n retryOnFailure: {\n defaultValue: false,\n },\n },\n params.outputSchema,\n params.audience,\n params.aiMetadata,\n params.classification,\n );\n};\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/dropdown/dropdown-prop.ts. MIT; see ../../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport { BasePropertySchema, TPropertyValue } from \"../common.js\";\nimport type { DropdownState } from \"./common.js\";\nimport type {\n AppConnectionValueForAuthProperty,\n PropertyContext,\n} from \"../../../context/index.js\";\nimport * as z from \"zod/mini\";\nimport { PropertyType } from \"../property-type.js\";\nimport type { PieceAuthProperty } from \"../../authentication/index.js\";\n\ntype DynamicDropdownOptions<\n T,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n> = (\n propsValue: Record<string, unknown> & {\n auth?: PieceAuth extends undefined\n ? undefined\n : AppConnectionValueForAuthProperty<Exclude<PieceAuth, undefined>>;\n },\n ctx: PropertyContext,\n) => Promise<DropdownState<T>>;\n\nexport const DropdownProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.unknown(), PropertyType.DROPDOWN).shape,\n refreshers: z.array(z.string()),\n});\n\nexport type DropdownProperty<\n T,\n R extends boolean,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n> = BasePropertySchema & {\n /**\n * A dummy property used to infer {@code PieceAuth} type\n */\n auth: PieceAuth;\n refreshers: string[];\n refreshOnSearch?: boolean;\n options: DynamicDropdownOptions<T, PieceAuth>;\n} & TPropertyValue<T, PropertyType.DROPDOWN, R>;\n\nexport const MultiSelectDropdownProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.array(z.unknown()), PropertyType.MULTI_SELECT_DROPDOWN)\n .shape,\n refreshers: z.array(z.string()),\n});\n\nexport type MultiSelectDropdownProperty<\n T,\n R extends boolean,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n> = BasePropertySchema & {\n /**\n * A dummy property used to infer {@code PieceAuth} type\n */\n auth: PieceAuth;\n refreshers: string[];\n refreshOnSearch?: boolean;\n options: DynamicDropdownOptions<T, PieceAuth>;\n} & TPropertyValue<T[], PropertyType.MULTI_SELECT_DROPDOWN, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/json-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\n\nexport const JsonProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(\n z.union([z.record(z.string(), z.unknown())]),\n PropertyType.JSON,\n ).shape,\n});\nexport type JsonProperty<R extends boolean> = BasePropertySchema &\n TPropertyValue<Record<string, unknown>, PropertyType.JSON, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/color-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\n\nexport const ColorProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.string(), PropertyType.COLOR).shape,\n});\n\nexport type ColorProperty<R extends boolean> = BasePropertySchema &\n TPropertyValue<string, PropertyType.COLOR, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/date-time-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\n\nexport const DateTimeProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.string(), PropertyType.DATE_TIME).shape,\n});\n\nexport type DateTimeProperty<R extends boolean> = BasePropertySchema &\n TPropertyValue<string, PropertyType.DATE_TIME, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/array-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\nimport { LongTextProperty, ShortTextProperty } from \"./text-property.js\";\nimport {\n StaticDropdownProperty,\n StaticMultiSelectDropdownProperty,\n} from \"./dropdown/static-dropdown.js\";\nimport { MultiSelectDropdownProperty } from \"./dropdown/dropdown-prop.js\";\nimport { CheckboxProperty } from \"./checkbox-property.js\";\nimport { NumberProperty } from \"./number-property.js\";\nimport { FileProperty } from \"./file-property.js\";\nimport { JsonProperty } from \"./json-property.js\";\nimport { ColorProperty } from \"./color-property.js\";\nimport { DateTimeProperty } from \"./date-time-property.js\";\n\nexport const ArraySubProps = z.record(\n z.string(),\n z.union([\n ShortTextProperty,\n LongTextProperty,\n StaticDropdownProperty,\n MultiSelectDropdownProperty,\n StaticMultiSelectDropdownProperty,\n CheckboxProperty,\n NumberProperty,\n FileProperty,\n JsonProperty,\n ColorProperty,\n DateTimeProperty,\n ]),\n);\n\nexport const ArrayProperty = z.object({\n ...BasePropertySchema.shape,\n properties: z.optional(ArraySubProps),\n ...TPropertyValue(z.array(z.unknown()), PropertyType.ARRAY).shape,\n});\n\nexport type ArraySubProps<R extends boolean> = Record<\n string,\n | ShortTextProperty<R>\n | LongTextProperty<R>\n | StaticDropdownProperty<unknown, R>\n | MultiSelectDropdownProperty<unknown, R>\n | StaticMultiSelectDropdownProperty<unknown, R>\n | CheckboxProperty<R>\n | NumberProperty<R>\n | FileProperty<R>\n | JsonProperty<R>\n | ColorProperty<R>\n | DateTimeProperty<R>\n>;\n\nexport type ArrayProperty<R extends boolean> = BasePropertySchema & {\n properties?: ArraySubProps<R>;\n} & TPropertyValue<unknown[], PropertyType.ARRAY, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/dynamic-prop.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport {\n StaticDropdownProperty,\n StaticMultiSelectDropdownProperty,\n} from \"./dropdown/static-dropdown.js\";\nimport { ShortTextProperty } from \"./text-property.js\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport type {\n AppConnectionValueForAuthProperty,\n PropertyContext,\n} from \"../../context/index.js\";\nimport { PropertyType } from \"./property-type.js\";\nimport { JsonProperty } from \"./json-property.js\";\nimport { ArrayProperty } from \"./array-property.js\";\nimport type {\n ExtractPieceAuthPropertyTypeForMethods,\n InputPropertyMap,\n PieceAuthProperty,\n} from \"../index.js\";\n\nexport const DynamicProp = z.union([\n ShortTextProperty,\n StaticDropdownProperty,\n JsonProperty,\n ArrayProperty,\n StaticMultiSelectDropdownProperty,\n]);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DynamicProp =\n | ShortTextProperty<boolean>\n | StaticDropdownProperty<any, boolean>\n | JsonProperty<boolean>\n | ArrayProperty<boolean>\n | StaticMultiSelectDropdownProperty<any, boolean>;\n\nexport const DynamicPropsValue = z.record(z.string(), DynamicProp);\n\nexport type DynamicPropsValue = Record<string, DynamicProp[\"valueSchema\"]>;\n\nexport const DynamicProperties = z.object({\n refreshers: z.array(z.string()),\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.unknown(), PropertyType.DYNAMIC).shape,\n});\n\nexport type DynamicProperties<\n R extends boolean,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n> = BasePropertySchema & {\n //dummy property to define auth property value inside props value\n auth: PieceAuth;\n props: DynamicPropertiesOptions<PieceAuth>;\n refreshers: string[];\n} & TPropertyValue<DynamicPropsValue, PropertyType.DYNAMIC, R>;\n\ntype DynamicPropertiesOptions<\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n> = (\n propsValue: Record<string, unknown> & {\n auth?: AppConnectionValueForAuthProperty<\n ExtractPieceAuthPropertyTypeForMethods<PieceAuth>\n >;\n },\n ctx: PropertyContext,\n) => Promise<InputPropertyMap>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/core/utils/src/lib/assertions.ts. MIT; see ../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nexport function assertEqual<T>(\n actual: T,\n expected: T,\n fieldName1: string,\n fieldName2: string,\n): asserts actual is T {\n if (actual !== expected) {\n throw new Error(`${fieldName1} and ${fieldName2} should be equal`);\n }\n}\n\nexport function assertNotNullOrUndefined<T>(\n value: T | null | undefined,\n fieldName: string,\n): asserts value is T {\n if (value === null || value === undefined) {\n throw new Error(`${fieldName} is null or undefined`);\n }\n}\n\nexport function assertNotEqual<T>(\n value1: T,\n value2: T,\n fieldName1: string,\n fieldName2: string,\n): void {\n if (value1 === value2) {\n throw new Error(`${fieldName1} and ${fieldName2} should not be equal`);\n }\n}\n\nexport const isNotUndefined = <T>(value: T | undefined): value is T => {\n return value !== undefined;\n};\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/object-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\n\nexport const ObjectProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.record(z.string(), z.unknown()), PropertyType.OBJECT)\n .shape,\n});\n\nexport type ObjectProperty<R extends boolean> = BasePropertySchema &\n TPropertyValue<Record<string, unknown>, PropertyType.OBJECT, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/rich-text-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\n\nexport const RichTextProperty = z.object({\n ...BasePropertySchema.shape,\n formatProperty: z.optional(z.string()),\n ...TPropertyValue(z.string(), PropertyType.RICH_TEXT).shape,\n});\n\nexport type RichTextProperty<R extends boolean> = BasePropertySchema & {\n /**\n * Name of a sibling property whose value selects the editing mode.\n * The sibling value is mapped by convention: 'plain_text' | 'plain' | 'text' -> plain,\n * 'html' -> rich/html, 'markdown' | 'md' -> markdown. Anything else falls back to plain.\n */\n formatProperty?: string;\n} & TPropertyValue<string, PropertyType.RICH_TEXT, R>;\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/custom-property.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { BasePropertySchema, TPropertyValue } from \"./common.js\";\nimport { PropertyType } from \"./property-type.js\";\n\n// Code should be a valid javascript function that takes a single argument which is an object\n/*\n(ctx: {containerId:string, value: unknown, onChange: (value: unknown) => void, isEmbeded: boolean, projectId:string}) => void\n*/\nexport const CustomProperty = z.object({\n ...BasePropertySchema.shape,\n ...TPropertyValue(z.unknown(), PropertyType.CUSTOM).shape,\n code: z.string(),\n});\n\nexport type CustomProperty<R extends boolean> = BasePropertySchema &\n TPropertyValue<unknown, PropertyType.CUSTOM, R> & {\n code: string;\n };\n\nexport type CustomPropertyCodeFunctionParams = {\n containerId: string;\n value: unknown;\n onChange: (value: unknown) => void;\n isEmbeded: boolean;\n projectId: string;\n property: Pick<\n CustomProperty<boolean>,\n \"displayName\" | \"description\" | \"required\"\n >;\n disabled: boolean;\n};\n","// Vendored from activepieces/activepieces@0.91.0 packages/pieces/framework/src/lib/property/input/index.ts. MIT; see ../../../../../LICENSE.\n// Generated by scripts/sync-upstream.mts — do not edit by hand.\nimport * as z from \"zod/mini\";\nimport { ArrayProperty } from \"./array-property.js\";\nimport { CheckboxProperty } from \"./checkbox-property.js\";\nimport { DateTimeProperty } from \"./date-time-property.js\";\nimport { DateRangeProperty } from \"./date-range-property.js\";\nimport {\n DropdownProperty,\n MultiSelectDropdownProperty,\n} from \"./dropdown/dropdown-prop.js\";\nimport {\n StaticDropdownProperty,\n StaticMultiSelectDropdownProperty,\n} from \"./dropdown/static-dropdown.js\";\nimport { DynamicProperties } from \"./dynamic-prop.js\";\nimport { FileProperty } from \"./file-property.js\";\nimport { JsonProperty } from \"./json-property.js\";\nimport { MarkDownProperty } from \"./markdown-property.js\";\nimport { MarkdownVariant } from \"../../../../core-piece-types/index.js\";\nimport { NumberProperty } from \"./number-property.js\";\nimport { ObjectProperty } from \"./object-property.js\";\nimport { PropertyType } from \"./property-type.js\";\nimport { LongTextProperty, ShortTextProperty } from \"./text-property.js\";\nimport { RichTextProperty } from \"./rich-text-property.js\";\nimport { CustomProperty } from \"./custom-property.js\";\nimport type { CustomPropertyCodeFunctionParams } from \"./custom-property.js\";\nimport { ColorProperty } from \"./color-property.js\";\nimport type { PieceAuthProperty } from \"../authentication/index.js\";\n\nexport const InputProperty = z.union([\n ShortTextProperty,\n LongTextProperty,\n RichTextProperty,\n MarkDownProperty,\n CheckboxProperty,\n StaticDropdownProperty,\n StaticMultiSelectDropdownProperty,\n DropdownProperty,\n MultiSelectDropdownProperty,\n DynamicProperties,\n NumberProperty,\n ArrayProperty,\n ObjectProperty,\n JsonProperty,\n DateTimeProperty,\n DateRangeProperty,\n FileProperty,\n CustomProperty,\n ColorProperty,\n]);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type InputProperty =\n | ShortTextProperty<boolean>\n | LongTextProperty<boolean>\n | RichTextProperty<boolean>\n | MarkDownProperty\n | CheckboxProperty<boolean>\n | DropdownProperty<\n any,\n boolean,\n PieceAuthProperty | undefined | PieceAuthProperty[]\n >\n | StaticDropdownProperty<any, boolean>\n | NumberProperty<boolean>\n | ArrayProperty<boolean>\n | ObjectProperty<boolean>\n | JsonProperty<boolean>\n | MultiSelectDropdownProperty<\n any,\n boolean,\n PieceAuthProperty | undefined | PieceAuthProperty[]\n >\n | StaticMultiSelectDropdownProperty<any, boolean>\n | DynamicProperties<\n boolean,\n PieceAuthProperty | PieceAuthProperty[] | undefined\n >\n | DateTimeProperty<boolean>\n | DateRangeProperty<boolean>\n | FileProperty<boolean, boolean>\n | CustomProperty<boolean>\n | ColorProperty<boolean>;\n\ntype Properties<T> = Omit<\n T,\n \"valueSchema\" | \"type\" | \"defaultValidators\" | \"defaultProcessors\"\n>;\n\nexport const Property = {\n ShortText<R extends boolean>(\n request: Properties<ShortTextProperty<R>>,\n ): R extends true ? ShortTextProperty<true> : ShortTextProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.SHORT_TEXT,\n } as unknown as R extends true\n ? ShortTextProperty<true>\n : ShortTextProperty<false>;\n },\n Checkbox<R extends boolean>(\n request: Properties<CheckboxProperty<R>>,\n ): R extends true ? CheckboxProperty<true> : CheckboxProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.CHECKBOX,\n } as unknown as R extends true\n ? CheckboxProperty<true>\n : CheckboxProperty<false>;\n },\n LongText<R extends boolean>(\n request: Properties<LongTextProperty<R>>,\n ): R extends true ? LongTextProperty<true> : LongTextProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.LONG_TEXT,\n } as unknown as R extends true\n ? LongTextProperty<true>\n : LongTextProperty<false>;\n },\n RichText<R extends boolean>(\n request: Properties<RichTextProperty<R>>,\n ): R extends true ? RichTextProperty<true> : RichTextProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.RICH_TEXT,\n } as unknown as R extends true\n ? RichTextProperty<true>\n : RichTextProperty<false>;\n },\n MarkDown(request: {\n value: string;\n variant?: MarkdownVariant;\n }): MarkDownProperty {\n return {\n displayName: \"Markdown\",\n required: false,\n description: request.value,\n type: PropertyType.MARKDOWN,\n valueSchema: undefined as never,\n variant: request.variant ?? MarkdownVariant.INFO,\n };\n },\n Number<R extends boolean>(\n request: Properties<NumberProperty<R>>,\n ): R extends true ? NumberProperty<true> : NumberProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.NUMBER,\n } as unknown as R extends true\n ? NumberProperty<true>\n : NumberProperty<false>;\n },\n\n Json<R extends boolean>(\n request: Properties<JsonProperty<R>>,\n ): R extends true ? JsonProperty<true> : JsonProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.JSON,\n } as unknown as R extends true ? JsonProperty<true> : JsonProperty<false>;\n },\n Array<R extends boolean>(\n request: Properties<ArrayProperty<R>>,\n ): R extends true ? ArrayProperty<true> : ArrayProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.ARRAY,\n } as unknown as R extends true ? ArrayProperty<true> : ArrayProperty<false>;\n },\n Object<R extends boolean>(\n request: Properties<ObjectProperty<R>>,\n ): R extends true ? ObjectProperty<true> : ObjectProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.OBJECT,\n } as unknown as R extends true\n ? ObjectProperty<true>\n : ObjectProperty<false>;\n },\n Dropdown<\n T,\n R extends boolean = boolean,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n >(\n request: Properties<DropdownProperty<T, R, PieceAuth>>,\n ): R extends true\n ? DropdownProperty<T, true, PieceAuth>\n : DropdownProperty<T, false, PieceAuth> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.DROPDOWN,\n } as unknown as R extends true\n ? DropdownProperty<T, true, PieceAuth>\n : DropdownProperty<T, false, PieceAuth>;\n },\n StaticDropdown<T, R extends boolean = boolean>(\n request: Properties<StaticDropdownProperty<T, R>>,\n ): R extends true\n ? StaticDropdownProperty<T, true>\n : StaticDropdownProperty<T, false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.STATIC_DROPDOWN,\n } as unknown as R extends true\n ? StaticDropdownProperty<T, true>\n : StaticDropdownProperty<T, false>;\n },\n MultiSelectDropdown<\n T,\n R extends boolean = boolean,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n >(\n request: Properties<MultiSelectDropdownProperty<T, R, PieceAuth>>,\n ): R extends true\n ? MultiSelectDropdownProperty<T, true, PieceAuth>\n : MultiSelectDropdownProperty<T, false, PieceAuth> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.MULTI_SELECT_DROPDOWN,\n } as unknown as R extends true\n ? MultiSelectDropdownProperty<T, true, PieceAuth>\n : MultiSelectDropdownProperty<T, false, PieceAuth>;\n },\n DynamicProperties<\n R extends boolean = boolean,\n PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined =\n undefined,\n >(\n request: Properties<DynamicProperties<R, PieceAuth>>,\n ): R extends true\n ? DynamicProperties<true, PieceAuth>\n : DynamicProperties<false, PieceAuth> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.DYNAMIC,\n } as unknown as R extends true\n ? DynamicProperties<true, PieceAuth>\n : DynamicProperties<false, PieceAuth>;\n },\n StaticMultiSelectDropdown<T, R extends boolean = boolean>(\n request: Properties<StaticMultiSelectDropdownProperty<T, R>>,\n ): R extends true\n ? StaticMultiSelectDropdownProperty<T, true>\n : StaticMultiSelectDropdownProperty<T, false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.STATIC_MULTI_SELECT_DROPDOWN,\n } as unknown as R extends true\n ? StaticMultiSelectDropdownProperty<T, true>\n : StaticMultiSelectDropdownProperty<T, false>;\n },\n DateTime<R extends boolean>(\n request: Properties<DateTimeProperty<R>>,\n ): R extends true ? DateTimeProperty<true> : DateTimeProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.DATE_TIME,\n } as unknown as R extends true\n ? DateTimeProperty<true>\n : DateTimeProperty<false>;\n },\n DateRange<R extends boolean>(\n request: Properties<DateRangeProperty<R>>,\n ): R extends true ? DateRangeProperty<true> : DateRangeProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.DATE_RANGE,\n } as unknown as R extends true\n ? DateRangeProperty<true>\n : DateRangeProperty<false>;\n },\n File<R extends boolean, S extends boolean = false>(\n request: Properties<FileProperty<R, S>>,\n ): FileProperty<\n R extends true ? true : false,\n S extends true ? true : false\n > {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.FILE,\n } as unknown as FileProperty<\n R extends true ? true : false,\n S extends true ? true : false\n >;\n },\n Custom<R extends boolean>(\n request: Omit<Properties<CustomProperty<R>>, \"code\"> & {\n /**\n * This is designed to be self-contained and operates independently of any\n * external libraries or imported dependencies. All necessary logic and\n * functionality are implemented within this function itself.\n *\n * You can return a cleanup function that will be called when the component is unmounted in the frontend.\n * */\n code: (ctx: CustomPropertyCodeFunctionParams) => (() => void) | void;\n },\n ): R extends true ? CustomProperty<true> : CustomProperty<false> {\n const code = request.code.toString();\n return {\n ...request,\n code,\n valueSchema: undefined,\n type: PropertyType.CUSTOM,\n } as unknown as R extends true\n ? CustomProperty<true>\n : CustomProperty<false>;\n },\n Color<R extends boolean>(\n request: Properties<ColorProperty<R>>,\n ): R extends true ? ColorProperty<true> : ColorProperty<false> {\n return {\n ...request,\n valueSchema: undefined,\n type: PropertyType.COLOR,\n } as unknown as R extends true ? ColorProperty<true> : ColorProperty<false>;\n },\n};\n"],"mappings":";;;;AAwBA,MAAa,4BAA4B,EAAE,OAAO;CAChD,gBAAgB,EAAE,OAAO;EACvB,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC;EACrC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;EAC9B,CAAC;CACF,mBAAmB,EAAE,OAAO;EAC1B,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC;EACrC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;EAC9B,CAAC;CACH,CAAC;AAsCF,IAAa,UAAb,MAGwB;CACtB,YACE,AAAgB,MAChB,AAAgB,aAChB,AAAgB,aAChB,AAAgB,OAChB,AAAgB,gBAChB,AAAgB,KAIhB,AAAgB,MAIhB,AAAgB,aAChB,AAAgB,sBAChB,AAAgB,cAChB,AAAgB,UAChB,AAAgB,YAChB,A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SACmE;AACnE,SAAO;GACL,GAAG;GACH,aAAa;GACb,MAAM,aAAa;GACpB;;CAIH,UACE,SACqE;AACrE,SAAO;GACL,GAAG;GACH,aAAa;GACb,MAAM,aAAa;GACpB;;CAIH,KACE,SAIA;AACA,SAAO;GACL,GAAG;GACH,aAAa;GACb,MAAM,aAAa;GACpB;;CAKH,OACE,SAU+D;EAC/D,MAAM,OAAO,QAAQ,KAAK,UAAU;AACpC,SAAO;GACL,GAAG;GACH;GACA,aAAa;GACb,MAAM,aAAa;GACpB;;CAIH,MACE,SAC6D;AAC7D,SAAO;GACL,GAAG;GACH,aAAa;GACb,MAAM,aAAa;GACpB;;CAEJ"}
@@ -0,0 +1,285 @@
1
+ import * as z from "zod/mini";
2
+
3
+ //#region upstream/framework/lib/property/input/common.ts
4
+ const BasePropertySchema = z.object({
5
+ displayName: z.string(),
6
+ description: z.optional(z.string()),
7
+ advanced: z.optional(z.boolean()),
8
+ width: z.optional(z.enum(["half", "full"])),
9
+ icon: z.optional(z.string()),
10
+ placeholder: z.optional(z.string())
11
+ });
12
+ const TPropertyValue = (_T, propertyType) => z.object({
13
+ type: z.literal(propertyType),
14
+ required: z.boolean(),
15
+ defaultValue: z.optional(z.any())
16
+ });
17
+
18
+ //#endregion
19
+ //#region upstream/framework/lib/property/input/property-type.ts
20
+ let PropertyType = /* @__PURE__ */ function(PropertyType) {
21
+ PropertyType["SHORT_TEXT"] = "SHORT_TEXT";
22
+ PropertyType["LONG_TEXT"] = "LONG_TEXT";
23
+ PropertyType["RICH_TEXT"] = "RICH_TEXT";
24
+ PropertyType["MARKDOWN"] = "MARKDOWN";
25
+ PropertyType["DROPDOWN"] = "DROPDOWN";
26
+ PropertyType["STATIC_DROPDOWN"] = "STATIC_DROPDOWN";
27
+ PropertyType["NUMBER"] = "NUMBER";
28
+ PropertyType["CHECKBOX"] = "CHECKBOX";
29
+ PropertyType["OAUTH2"] = "OAUTH2";
30
+ PropertyType["SECRET_TEXT"] = "SECRET_TEXT";
31
+ PropertyType["ARRAY"] = "ARRAY";
32
+ PropertyType["OBJECT"] = "OBJECT";
33
+ PropertyType["BASIC_AUTH"] = "BASIC_AUTH";
34
+ PropertyType["JSON"] = "JSON";
35
+ PropertyType["MULTI_SELECT_DROPDOWN"] = "MULTI_SELECT_DROPDOWN";
36
+ PropertyType["STATIC_MULTI_SELECT_DROPDOWN"] = "STATIC_MULTI_SELECT_DROPDOWN";
37
+ PropertyType["DYNAMIC"] = "DYNAMIC";
38
+ PropertyType["CUSTOM_AUTH"] = "CUSTOM_AUTH";
39
+ PropertyType["OIDC"] = "OIDC";
40
+ PropertyType["DATE_TIME"] = "DATE_TIME";
41
+ PropertyType["DATE_RANGE"] = "DATE_RANGE";
42
+ PropertyType["FILE"] = "FILE";
43
+ PropertyType["CUSTOM"] = "CUSTOM";
44
+ PropertyType["COLOR"] = "COLOR";
45
+ return PropertyType;
46
+ }({});
47
+
48
+ //#endregion
49
+ //#region upstream/framework/lib/property/input/text-property.ts
50
+ const ShortTextProperty = z.object({
51
+ ...BasePropertySchema.shape,
52
+ ...TPropertyValue(z.string(), PropertyType.SHORT_TEXT).shape
53
+ });
54
+ const LongTextProperty = z.object({
55
+ ...BasePropertySchema.shape,
56
+ ...TPropertyValue(z.string(), PropertyType.LONG_TEXT).shape
57
+ });
58
+
59
+ //#endregion
60
+ //#region upstream/framework/lib/property/input/dropdown/common.ts
61
+ const DropdownOption = z.object({
62
+ label: z.string(),
63
+ value: z.unknown(),
64
+ description: z.optional(z.string()),
65
+ icon: z.optional(z.string())
66
+ });
67
+ const DropdownState = z.object({
68
+ disabled: z.optional(z.boolean()),
69
+ placeholder: z.optional(z.string()),
70
+ options: z.array(DropdownOption)
71
+ });
72
+
73
+ //#endregion
74
+ //#region upstream/framework/lib/property/input/dropdown/static-dropdown.ts
75
+ const StaticDropdownDisplay = z.enum(["cards"]);
76
+ const StaticDropdownProperty = z.object({
77
+ ...BasePropertySchema.shape,
78
+ options: DropdownState,
79
+ display: z.optional(StaticDropdownDisplay),
80
+ ...TPropertyValue(z.unknown(), PropertyType.STATIC_DROPDOWN).shape
81
+ });
82
+ const StaticMultiSelectDropdownProperty = z.object({
83
+ ...BasePropertySchema.shape,
84
+ options: DropdownState,
85
+ ...TPropertyValue(z.array(z.unknown()), PropertyType.STATIC_MULTI_SELECT_DROPDOWN).shape
86
+ });
87
+
88
+ //#endregion
89
+ //#region upstream/framework/lib/property/input/checkbox-property.ts
90
+ const CheckboxProperty = z.object({
91
+ ...BasePropertySchema.shape,
92
+ reveals: z.optional(z.array(z.string())),
93
+ ...TPropertyValue(z.boolean(), PropertyType.CHECKBOX).shape
94
+ });
95
+
96
+ //#endregion
97
+ //#region upstream/framework/lib/property/input/number-property.ts
98
+ const NumberProperty = z.object({
99
+ ...BasePropertySchema.shape,
100
+ display: z.optional(z.enum(["stepper"])),
101
+ min: z.optional(z.number()),
102
+ max: z.optional(z.number()),
103
+ step: z.optional(z.number()),
104
+ ...TPropertyValue(z.number(), PropertyType.NUMBER).shape
105
+ });
106
+
107
+ //#endregion
108
+ //#region upstream/framework/lib/property/input/file-property.ts
109
+ var ApFile = class {
110
+ constructor(filename, data, extension) {
111
+ this.filename = filename;
112
+ this.data = data;
113
+ this.extension = extension;
114
+ }
115
+ get base64() {
116
+ return this.data.toString("base64");
117
+ }
118
+ };
119
+ const FileProperty = z.object({
120
+ ...BasePropertySchema.shape,
121
+ streaming: z.optional(z.boolean()),
122
+ ...TPropertyValue(z.unknown(), PropertyType.FILE).shape
123
+ });
124
+
125
+ //#endregion
126
+ //#region upstream/framework/lib/property/input/date-range-property.ts
127
+ const DateRangePreset = z.enum([
128
+ "any_time",
129
+ "last_24_hours",
130
+ "last_7_days",
131
+ "last_30_days",
132
+ "last_90_days",
133
+ "this_month",
134
+ "custom"
135
+ ]);
136
+ const DateRangeValue = z.object({
137
+ preset: z.optional(DateRangePreset),
138
+ after: z.optional(z.string()),
139
+ before: z.optional(z.string())
140
+ });
141
+ const DateRangeProperty = z.object({
142
+ ...BasePropertySchema.shape,
143
+ display: z.optional(z.enum(["dropdown"])),
144
+ ...TPropertyValue(DateRangeValue, PropertyType.DATE_RANGE).shape
145
+ });
146
+ function isoDaysAgo(days) {
147
+ return (/* @__PURE__ */ new Date(Date.now() - days * 24 * 60 * 60 * 1e3)).toISOString();
148
+ }
149
+ function startOfThisMonth() {
150
+ const now = /* @__PURE__ */ new Date();
151
+ return new Date(now.getFullYear(), now.getMonth(), 1).toISOString();
152
+ }
153
+ function resolve(value) {
154
+ if (!value || !value.preset || value.preset === "any_time") return {};
155
+ switch (value.preset) {
156
+ case "last_24_hours": return { after: isoDaysAgo(1) };
157
+ case "last_7_days": return { after: isoDaysAgo(7) };
158
+ case "last_30_days": return { after: isoDaysAgo(30) };
159
+ case "last_90_days": return { after: isoDaysAgo(90) };
160
+ case "this_month": return { after: startOfThisMonth() };
161
+ case "custom": return {
162
+ after: value.after && value.after.length > 0 ? value.after : void 0,
163
+ before: value.before && value.before.length > 0 ? value.before : void 0
164
+ };
165
+ default: return {};
166
+ }
167
+ }
168
+ const dateRangeUtils = { resolve };
169
+
170
+ //#endregion
171
+ //#region upstream/core-piece-types/lib/markdown.ts
172
+ let MarkdownVariant = /* @__PURE__ */ function(MarkdownVariant) {
173
+ MarkdownVariant["BORDERLESS"] = "BORDERLESS";
174
+ MarkdownVariant["INFO"] = "INFO";
175
+ MarkdownVariant["WARNING"] = "WARNING";
176
+ MarkdownVariant["TIP"] = "TIP";
177
+ return MarkdownVariant;
178
+ }({});
179
+
180
+ //#endregion
181
+ //#region upstream/core-utils/lib/utils.ts
182
+ function isString(str) {
183
+ return str != null && typeof str === "string";
184
+ }
185
+ function isNil(value) {
186
+ return value === null || value === void 0;
187
+ }
188
+ function kebabCase(str) {
189
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").replace(/_/g, "-").toLowerCase().replace(/^-+|-+$/g, "");
190
+ }
191
+ function isEmpty(value) {
192
+ if (value == null) return true;
193
+ if (typeof value === "string" || Array.isArray(value)) return value.length === 0;
194
+ if (typeof value === "object") return Object.keys(value).length === 0;
195
+ return false;
196
+ }
197
+ function startCase(str) {
198
+ return str.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").replace(/^[a-z]/, (match) => match.toUpperCase()).replace(/\b[a-z]/g, (match) => match.toUpperCase());
199
+ }
200
+ function camelCase(str) {
201
+ return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace("-", "").replace("_", ""));
202
+ }
203
+ function parseToJsonIfPossible(str) {
204
+ try {
205
+ return JSON.parse(str);
206
+ } catch (e) {
207
+ return str;
208
+ }
209
+ }
210
+ function pickBy(object, predicate) {
211
+ return Object.keys(object).reduce((result, key) => {
212
+ if (predicate(object[key], key)) result[key] = object[key];
213
+ return result;
214
+ }, {});
215
+ }
216
+ function chunk(records, size) {
217
+ const chunks = [];
218
+ for (let i = 0; i < records.length; i += size) chunks.push(records.slice(i, i + size));
219
+ return chunks;
220
+ }
221
+ function unique(array) {
222
+ const seen = /* @__PURE__ */ new Set();
223
+ return array.filter((item) => {
224
+ const key = JSON.stringify(item);
225
+ if (seen.has(key)) return false;
226
+ seen.add(key);
227
+ return true;
228
+ });
229
+ }
230
+ const INVALID_BASE64_CHARS = /[^A-Za-z0-9+/=]/;
231
+ function isBase64(value, options) {
232
+ if (!isString(value) || value.length === 0) return false;
233
+ if (options?.allowMime) {
234
+ const base64MarkerIndex = value.indexOf(";base64,");
235
+ if (base64MarkerIndex !== -1 && value.startsWith("data:")) return _isValidBase64String(value.slice(base64MarkerIndex + 8));
236
+ }
237
+ return _isValidBase64String(value);
238
+ }
239
+ function _isValidBase64String(str) {
240
+ const len = str.length;
241
+ if (len === 0 || len % 4 !== 0 || INVALID_BASE64_CHARS.test(str)) return false;
242
+ const firstPaddingIndex = str.indexOf("=");
243
+ return firstPaddingIndex === -1 || firstPaddingIndex === len - 1 || firstPaddingIndex === len - 2 && str[len - 1] === "=";
244
+ }
245
+
246
+ //#endregion
247
+ //#region upstream/core-utils/lib/try-catch.ts
248
+ async function tryCatch(fn) {
249
+ try {
250
+ return {
251
+ data: await fn(),
252
+ error: null
253
+ };
254
+ } catch (error) {
255
+ return {
256
+ data: null,
257
+ error
258
+ };
259
+ }
260
+ }
261
+ function tryCatchSync(fn) {
262
+ try {
263
+ return {
264
+ data: fn(),
265
+ error: null
266
+ };
267
+ } catch (error) {
268
+ return {
269
+ data: null,
270
+ error
271
+ };
272
+ }
273
+ }
274
+
275
+ //#endregion
276
+ //#region upstream/framework/lib/property/input/markdown-property.ts
277
+ const MarkDownProperty = z.object({
278
+ ...BasePropertySchema.shape,
279
+ ...TPropertyValue(z.void(), PropertyType.MARKDOWN).shape,
280
+ variant: z.optional(z.enum(MarkdownVariant))
281
+ });
282
+
283
+ //#endregion
284
+ export { PropertyType as A, CheckboxProperty as C, DropdownState as D, DropdownOption as E, TPropertyValue as M, LongTextProperty as O, NumberProperty as S, StaticMultiSelectDropdownProperty as T, DateRangeProperty as _, chunk as a, ApFile as b, isNil as c, parseToJsonIfPossible as d, pickBy as f, DateRangePreset as g, MarkdownVariant as h, camelCase as i, BasePropertySchema as j, ShortTextProperty as k, isString as l, unique as m, tryCatch as n, isBase64 as o, startCase as p, tryCatchSync as r, isEmpty as s, MarkDownProperty as t, kebabCase as u, DateRangeValue as v, StaticDropdownProperty as w, FileProperty as x, dateRangeUtils as y };
285
+ //# sourceMappingURL=markdown-property-Df2l6_y_.js.map