@powerhousedao/pieces-framework 6.2.3-dev.100

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,321 @@
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-DMfHjEiL.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
+ name;
17
+ displayName;
18
+ description;
19
+ props;
20
+ propertyGroups;
21
+ run;
22
+ test;
23
+ requireAuth;
24
+ errorHandlingOptions;
25
+ outputSchema;
26
+ audience;
27
+ aiMetadata;
28
+ classification;
29
+ constructor(name, displayName, description, props, propertyGroups, run, test, requireAuth, errorHandlingOptions, outputSchema, audience, aiMetadata, classification) {
30
+ this.name = name;
31
+ this.displayName = displayName;
32
+ this.description = description;
33
+ this.props = props;
34
+ this.propertyGroups = propertyGroups;
35
+ this.run = run;
36
+ this.test = test;
37
+ this.requireAuth = requireAuth;
38
+ this.errorHandlingOptions = errorHandlingOptions;
39
+ this.outputSchema = outputSchema;
40
+ this.audience = audience;
41
+ this.aiMetadata = aiMetadata;
42
+ this.classification = classification;
43
+ }
44
+ };
45
+ const createAction = (params) => {
46
+ return new IAction(params.name, params.displayName, params.description, params.props, params.propertyGroups, params.run, params.test ?? params.run, params.requireAuth ?? true, params.errorHandlingOptions ?? {
47
+ continueOnFailure: { defaultValue: false },
48
+ retryOnFailure: { defaultValue: false }
49
+ }, params.outputSchema, params.audience, params.aiMetadata, params.classification);
50
+ };
51
+
52
+ //#endregion
53
+ //#region upstream/framework/lib/property/input/dropdown/dropdown-prop.ts
54
+ const DropdownProperty = z.object({
55
+ ...BasePropertySchema.shape,
56
+ ...TPropertyValue(z.unknown(), "DROPDOWN").shape,
57
+ refreshers: z.array(z.string())
58
+ });
59
+ const MultiSelectDropdownProperty = z.object({
60
+ ...BasePropertySchema.shape,
61
+ ...TPropertyValue(z.array(z.unknown()), "MULTI_SELECT_DROPDOWN").shape,
62
+ refreshers: z.array(z.string())
63
+ });
64
+
65
+ //#endregion
66
+ //#region upstream/framework/lib/property/input/json-property.ts
67
+ const JsonProperty = z.object({
68
+ ...BasePropertySchema.shape,
69
+ ...TPropertyValue(z.union([z.record(z.string(), z.unknown())]), "JSON").shape
70
+ });
71
+
72
+ //#endregion
73
+ //#region upstream/framework/lib/property/input/color-property.ts
74
+ const ColorProperty = z.object({
75
+ ...BasePropertySchema.shape,
76
+ ...TPropertyValue(z.string(), "COLOR").shape
77
+ });
78
+
79
+ //#endregion
80
+ //#region upstream/framework/lib/property/input/date-time-property.ts
81
+ const DateTimeProperty = z.object({
82
+ ...BasePropertySchema.shape,
83
+ ...TPropertyValue(z.string(), "DATE_TIME").shape
84
+ });
85
+
86
+ //#endregion
87
+ //#region upstream/framework/lib/property/input/array-property.ts
88
+ const ArraySubProps = z.record(z.string(), z.union([
89
+ ShortTextProperty,
90
+ LongTextProperty,
91
+ StaticDropdownProperty,
92
+ MultiSelectDropdownProperty,
93
+ StaticMultiSelectDropdownProperty,
94
+ CheckboxProperty,
95
+ NumberProperty,
96
+ FileProperty,
97
+ JsonProperty,
98
+ ColorProperty,
99
+ DateTimeProperty
100
+ ]));
101
+ const ArrayProperty = z.object({
102
+ ...BasePropertySchema.shape,
103
+ properties: z.optional(ArraySubProps),
104
+ ...TPropertyValue(z.array(z.unknown()), "ARRAY").shape
105
+ });
106
+
107
+ //#endregion
108
+ //#region upstream/framework/lib/property/input/dynamic-prop.ts
109
+ const DynamicProp = z.union([
110
+ ShortTextProperty,
111
+ StaticDropdownProperty,
112
+ JsonProperty,
113
+ ArrayProperty,
114
+ StaticMultiSelectDropdownProperty
115
+ ]);
116
+ const DynamicPropsValue = z.record(z.string(), DynamicProp);
117
+ const DynamicProperties = z.object({
118
+ refreshers: z.array(z.string()),
119
+ ...BasePropertySchema.shape,
120
+ ...TPropertyValue(z.unknown(), "DYNAMIC").shape
121
+ });
122
+
123
+ //#endregion
124
+ //#region upstream/core-utils/lib/assertions.ts
125
+ function assertNotNullOrUndefined(value, fieldName) {
126
+ if (value === null || value === void 0) throw new Error(`${fieldName} is null or undefined`);
127
+ }
128
+ const isNotUndefined = (value) => {
129
+ return value !== void 0;
130
+ };
131
+
132
+ //#endregion
133
+ //#region upstream/framework/lib/property/input/object-property.ts
134
+ const ObjectProperty = z.object({
135
+ ...BasePropertySchema.shape,
136
+ ...TPropertyValue(z.record(z.string(), z.unknown()), "OBJECT").shape
137
+ });
138
+
139
+ //#endregion
140
+ //#region upstream/framework/lib/property/input/rich-text-property.ts
141
+ const RichTextProperty = z.object({
142
+ ...BasePropertySchema.shape,
143
+ formatProperty: z.optional(z.string()),
144
+ ...TPropertyValue(z.string(), "RICH_TEXT").shape
145
+ });
146
+
147
+ //#endregion
148
+ //#region upstream/framework/lib/property/input/custom-property.ts
149
+ const CustomProperty = z.object({
150
+ ...BasePropertySchema.shape,
151
+ ...TPropertyValue(z.unknown(), "CUSTOM").shape,
152
+ code: z.string()
153
+ });
154
+
155
+ //#endregion
156
+ //#region upstream/framework/lib/property/input/index.ts
157
+ const InputProperty = z.union([
158
+ ShortTextProperty,
159
+ LongTextProperty,
160
+ RichTextProperty,
161
+ MarkDownProperty,
162
+ CheckboxProperty,
163
+ StaticDropdownProperty,
164
+ StaticMultiSelectDropdownProperty,
165
+ DropdownProperty,
166
+ MultiSelectDropdownProperty,
167
+ DynamicProperties,
168
+ NumberProperty,
169
+ ArrayProperty,
170
+ ObjectProperty,
171
+ JsonProperty,
172
+ DateTimeProperty,
173
+ DateRangeProperty,
174
+ FileProperty,
175
+ CustomProperty,
176
+ ColorProperty
177
+ ]);
178
+ const Property = {
179
+ ShortText(request) {
180
+ return {
181
+ ...request,
182
+ valueSchema: void 0,
183
+ type: "SHORT_TEXT"
184
+ };
185
+ },
186
+ Checkbox(request) {
187
+ return {
188
+ ...request,
189
+ valueSchema: void 0,
190
+ type: "CHECKBOX"
191
+ };
192
+ },
193
+ LongText(request) {
194
+ return {
195
+ ...request,
196
+ valueSchema: void 0,
197
+ type: "LONG_TEXT"
198
+ };
199
+ },
200
+ RichText(request) {
201
+ return {
202
+ ...request,
203
+ valueSchema: void 0,
204
+ type: "RICH_TEXT"
205
+ };
206
+ },
207
+ MarkDown(request) {
208
+ return {
209
+ displayName: "Markdown",
210
+ required: false,
211
+ description: request.value,
212
+ type: "MARKDOWN",
213
+ valueSchema: void 0,
214
+ variant: request.variant ?? "INFO"
215
+ };
216
+ },
217
+ Number(request) {
218
+ return {
219
+ ...request,
220
+ valueSchema: void 0,
221
+ type: "NUMBER"
222
+ };
223
+ },
224
+ Json(request) {
225
+ return {
226
+ ...request,
227
+ valueSchema: void 0,
228
+ type: "JSON"
229
+ };
230
+ },
231
+ Array(request) {
232
+ return {
233
+ ...request,
234
+ valueSchema: void 0,
235
+ type: "ARRAY"
236
+ };
237
+ },
238
+ Object(request) {
239
+ return {
240
+ ...request,
241
+ valueSchema: void 0,
242
+ type: "OBJECT"
243
+ };
244
+ },
245
+ Dropdown(request) {
246
+ return {
247
+ ...request,
248
+ valueSchema: void 0,
249
+ type: "DROPDOWN"
250
+ };
251
+ },
252
+ StaticDropdown(request) {
253
+ return {
254
+ ...request,
255
+ valueSchema: void 0,
256
+ type: "STATIC_DROPDOWN"
257
+ };
258
+ },
259
+ MultiSelectDropdown(request) {
260
+ return {
261
+ ...request,
262
+ valueSchema: void 0,
263
+ type: "MULTI_SELECT_DROPDOWN"
264
+ };
265
+ },
266
+ DynamicProperties(request) {
267
+ return {
268
+ ...request,
269
+ valueSchema: void 0,
270
+ type: "DYNAMIC"
271
+ };
272
+ },
273
+ StaticMultiSelectDropdown(request) {
274
+ return {
275
+ ...request,
276
+ valueSchema: void 0,
277
+ type: "STATIC_MULTI_SELECT_DROPDOWN"
278
+ };
279
+ },
280
+ DateTime(request) {
281
+ return {
282
+ ...request,
283
+ valueSchema: void 0,
284
+ type: "DATE_TIME"
285
+ };
286
+ },
287
+ DateRange(request) {
288
+ return {
289
+ ...request,
290
+ valueSchema: void 0,
291
+ type: "DATE_RANGE"
292
+ };
293
+ },
294
+ File(request) {
295
+ return {
296
+ ...request,
297
+ valueSchema: void 0,
298
+ type: "FILE"
299
+ };
300
+ },
301
+ Custom(request) {
302
+ const code = request.code.toString();
303
+ return {
304
+ ...request,
305
+ code,
306
+ valueSchema: void 0,
307
+ type: "CUSTOM"
308
+ };
309
+ },
310
+ Color(request) {
311
+ return {
312
+ ...request,
313
+ valueSchema: void 0,
314
+ type: "COLOR"
315
+ };
316
+ }
317
+ };
318
+
319
+ //#endregion
320
+ 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 };
321
+ //# sourceMappingURL=input-BHkj_oP5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-BHkj_oP5.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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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@d078d47750b53c13b837b2bec86b0402b4bff94f 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":"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cAAyB,CAAC,CAAC;AACxD,CAAC;;;;ACAD,MAAa,iBAAiB,EAAE,OAAO;CACrC,GAAG,mBAAmB;CACtB,GAAG,eAAe,EAAE,QAAQ,WAAsB,CAAC,CAAC;CACpD,MAAM,EAAE,OAAO;AACjB,CAAC;;;;ACgBD,MAAa,gBAAgB,EAAE,MAAM;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAwCD,MAAa,WAAW;CACtB,UACE,SACqE;EACrE,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,SACE,SACmE;EACnE,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,SACE,SACmE;EACnE,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,SACE,SACmE;EACnE,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,SAAS,SAGY;EACnB,OAAO;GACL,aAAa;GACb,UAAU;GACV,aAAa,QAAQ;GACrB;GACA,aAAa;GACb,SAAS,QAAQ;EACnB;CACF;CACA,OACE,SAC+D;EAC/D,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CAEA,KACE,SAC2D;EAC3D,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CACF;CACA,MACE,SAC6D;EAC7D,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CACF;CACA,OACE,SAC+D;EAC/D,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,SAME,SAGwC;EACxC,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,eACE,SAGmC;EACnC,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,oBAME,SAGmD;EACnD,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,kBAKE,SAGsC;EACtC,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,0BACE,SAG8C;EAC9C,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,SACE,SACmE;EACnE,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,UACE,SACqE;EACrE,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAGF;CACA,KACE,SAIA;EACA,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CAIF;CACA,OACE,SAU+D;EAC/D,MAAM,OAAO,QAAQ,KAAK,SAAS;EACnC,OAAO;GACL,GAAG;GACH;GACA,aAAa;GACb;EACF;CAGF;CACA,MACE,SAC6D;EAC7D,OAAO;GACL,GAAG;GACH,aAAa;GACb;EACF;CACF;AACF"}
@@ -0,0 +1,288 @@
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(), "SHORT_TEXT").shape
53
+ });
54
+ const LongTextProperty = z.object({
55
+ ...BasePropertySchema.shape,
56
+ ...TPropertyValue(z.string(), "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(), "STATIC_DROPDOWN").shape
81
+ });
82
+ const StaticMultiSelectDropdownProperty = z.object({
83
+ ...BasePropertySchema.shape,
84
+ options: DropdownState,
85
+ ...TPropertyValue(z.array(z.unknown()), "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(), "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(), "NUMBER").shape
105
+ });
106
+
107
+ //#endregion
108
+ //#region upstream/framework/lib/property/input/file-property.ts
109
+ var ApFile = class {
110
+ filename;
111
+ data;
112
+ extension;
113
+ constructor(filename, data, extension) {
114
+ this.filename = filename;
115
+ this.data = data;
116
+ this.extension = extension;
117
+ }
118
+ get base64() {
119
+ return this.data.toString("base64");
120
+ }
121
+ };
122
+ const FileProperty = z.object({
123
+ ...BasePropertySchema.shape,
124
+ streaming: z.optional(z.boolean()),
125
+ ...TPropertyValue(z.unknown(), "FILE").shape
126
+ });
127
+
128
+ //#endregion
129
+ //#region upstream/framework/lib/property/input/date-range-property.ts
130
+ const DateRangePreset = z.enum([
131
+ "any_time",
132
+ "last_24_hours",
133
+ "last_7_days",
134
+ "last_30_days",
135
+ "last_90_days",
136
+ "this_month",
137
+ "custom"
138
+ ]);
139
+ const DateRangeValue = z.object({
140
+ preset: z.optional(DateRangePreset),
141
+ after: z.optional(z.string()),
142
+ before: z.optional(z.string())
143
+ });
144
+ const DateRangeProperty = z.object({
145
+ ...BasePropertySchema.shape,
146
+ display: z.optional(z.enum(["dropdown"])),
147
+ ...TPropertyValue(DateRangeValue, "DATE_RANGE").shape
148
+ });
149
+ function isoDaysAgo(days) {
150
+ return (/* @__PURE__ */ new Date(Date.now() - days * 24 * 60 * 60 * 1e3)).toISOString();
151
+ }
152
+ function startOfThisMonth() {
153
+ const now = /* @__PURE__ */ new Date();
154
+ return new Date(now.getFullYear(), now.getMonth(), 1).toISOString();
155
+ }
156
+ function resolve(value) {
157
+ if (!value || !value.preset || value.preset === "any_time") return {};
158
+ switch (value.preset) {
159
+ case "last_24_hours": return { after: isoDaysAgo(1) };
160
+ case "last_7_days": return { after: isoDaysAgo(7) };
161
+ case "last_30_days": return { after: isoDaysAgo(30) };
162
+ case "last_90_days": return { after: isoDaysAgo(90) };
163
+ case "this_month": return { after: startOfThisMonth() };
164
+ case "custom": return {
165
+ after: value.after && value.after.length > 0 ? value.after : void 0,
166
+ before: value.before && value.before.length > 0 ? value.before : void 0
167
+ };
168
+ default: return {};
169
+ }
170
+ }
171
+ const dateRangeUtils = { resolve };
172
+
173
+ //#endregion
174
+ //#region upstream/core-piece-types/lib/markdown.ts
175
+ let MarkdownVariant = /* @__PURE__ */ function(MarkdownVariant) {
176
+ MarkdownVariant["BORDERLESS"] = "BORDERLESS";
177
+ MarkdownVariant["INFO"] = "INFO";
178
+ MarkdownVariant["WARNING"] = "WARNING";
179
+ MarkdownVariant["TIP"] = "TIP";
180
+ return MarkdownVariant;
181
+ }({});
182
+
183
+ //#endregion
184
+ //#region upstream/core-utils/lib/utils.ts
185
+ function isString(str) {
186
+ return str != null && typeof str === "string";
187
+ }
188
+ function isNil(value) {
189
+ return value === null || value === void 0;
190
+ }
191
+ function kebabCase(str) {
192
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").replace(/_/g, "-").toLowerCase().replace(/^-+|-+$/g, "");
193
+ }
194
+ function isEmpty(value) {
195
+ if (value == null) return true;
196
+ if (typeof value === "string" || Array.isArray(value)) return value.length === 0;
197
+ if (typeof value === "object") return Object.keys(value).length === 0;
198
+ return false;
199
+ }
200
+ function startCase(str) {
201
+ 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());
202
+ }
203
+ function camelCase(str) {
204
+ return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace("-", "").replace("_", ""));
205
+ }
206
+ function parseToJsonIfPossible(str) {
207
+ try {
208
+ return JSON.parse(str);
209
+ } catch (e) {
210
+ return str;
211
+ }
212
+ }
213
+ function pickBy(object, predicate) {
214
+ return Object.keys(object).reduce((result, key) => {
215
+ if (predicate(object[key], key)) result[key] = object[key];
216
+ return result;
217
+ }, {});
218
+ }
219
+ function chunk(records, size) {
220
+ const chunks = [];
221
+ for (let i = 0; i < records.length; i += size) chunks.push(records.slice(i, i + size));
222
+ return chunks;
223
+ }
224
+ function unique(array) {
225
+ const seen = /* @__PURE__ */ new Set();
226
+ return array.filter((item) => {
227
+ const key = JSON.stringify(item);
228
+ if (seen.has(key)) return false;
229
+ seen.add(key);
230
+ return true;
231
+ });
232
+ }
233
+ const INVALID_BASE64_CHARS = /[^A-Za-z0-9+/=]/;
234
+ function isBase64(value, options) {
235
+ if (!isString(value) || value.length === 0) return false;
236
+ if (options?.allowMime) {
237
+ const base64MarkerIndex = value.indexOf(";base64,");
238
+ if (base64MarkerIndex !== -1 && value.startsWith("data:")) return _isValidBase64String(value.slice(base64MarkerIndex + 8));
239
+ }
240
+ return _isValidBase64String(value);
241
+ }
242
+ function _isValidBase64String(str) {
243
+ const len = str.length;
244
+ if (len === 0 || len % 4 !== 0 || INVALID_BASE64_CHARS.test(str)) return false;
245
+ const firstPaddingIndex = str.indexOf("=");
246
+ return firstPaddingIndex === -1 || firstPaddingIndex === len - 1 || firstPaddingIndex === len - 2 && str[len - 1] === "=";
247
+ }
248
+
249
+ //#endregion
250
+ //#region upstream/core-utils/lib/try-catch.ts
251
+ async function tryCatch(fn) {
252
+ try {
253
+ return {
254
+ data: await fn(),
255
+ error: null
256
+ };
257
+ } catch (error) {
258
+ return {
259
+ data: null,
260
+ error
261
+ };
262
+ }
263
+ }
264
+ function tryCatchSync(fn) {
265
+ try {
266
+ return {
267
+ data: fn(),
268
+ error: null
269
+ };
270
+ } catch (error) {
271
+ return {
272
+ data: null,
273
+ error
274
+ };
275
+ }
276
+ }
277
+
278
+ //#endregion
279
+ //#region upstream/framework/lib/property/input/markdown-property.ts
280
+ const MarkDownProperty = z.object({
281
+ ...BasePropertySchema.shape,
282
+ ...TPropertyValue(z.void(), "MARKDOWN").shape,
283
+ variant: z.optional(z.enum(MarkdownVariant))
284
+ });
285
+
286
+ //#endregion
287
+ 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 };
288
+ //# sourceMappingURL=markdown-property-DMfHjEiL.js.map