@activepieces/shared 0.10.159 → 0.10.160

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/shared",
3
- "version": "0.10.159",
3
+ "version": "0.10.160",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@sinclair/typebox": "0.34.11",
@@ -1,10 +1,19 @@
1
1
  import { Static } from '@sinclair/typebox';
2
2
  import { FieldType } from '../field';
3
- export declare const CreateFieldRequest: import("@sinclair/typebox").TObject<{
3
+ export declare const CreateFieldRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
4
4
  name: import("@sinclair/typebox").TString;
5
- type: import("@sinclair/typebox").TEnum<typeof FieldType>;
5
+ type: import("@sinclair/typebox").TLiteral<FieldType.STATIC_DROPDOWN>;
6
6
  tableId: import("@sinclair/typebox").TString;
7
- }>;
7
+ data: import("@sinclair/typebox").TObject<{
8
+ options: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
9
+ value: import("@sinclair/typebox").TString;
10
+ }>>;
11
+ }>;
12
+ }>, import("@sinclair/typebox").TObject<{
13
+ name: import("@sinclair/typebox").TString;
14
+ type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<FieldType.TEXT>, import("@sinclair/typebox").TLiteral<FieldType.NUMBER>, import("@sinclair/typebox").TLiteral<FieldType.DATE>]>;
15
+ tableId: import("@sinclair/typebox").TString;
16
+ }>]>;
8
17
  export declare const UpdateFieldRequest: import("@sinclair/typebox").TObject<{
9
18
  name: import("@sinclair/typebox").TString;
10
19
  }>;
@@ -3,11 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateFieldRequest = exports.CreateFieldRequest = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
5
  const field_1 = require("../field");
6
- exports.CreateFieldRequest = typebox_1.Type.Object({
7
- name: typebox_1.Type.String(),
8
- type: typebox_1.Type.Enum(field_1.FieldType),
9
- tableId: typebox_1.Type.String(),
6
+ const StaticDropdownData = typebox_1.Type.Object({
7
+ options: typebox_1.Type.Array(typebox_1.Type.Object({
8
+ value: typebox_1.Type.String(),
9
+ })),
10
10
  });
11
+ exports.CreateFieldRequest = typebox_1.Type.Union([typebox_1.Type.Object({
12
+ name: typebox_1.Type.String(),
13
+ type: typebox_1.Type.Literal(field_1.FieldType.STATIC_DROPDOWN),
14
+ tableId: typebox_1.Type.String(),
15
+ data: StaticDropdownData,
16
+ }), typebox_1.Type.Object({
17
+ name: typebox_1.Type.String(),
18
+ type: typebox_1.Type.Union([typebox_1.Type.Literal(field_1.FieldType.TEXT), typebox_1.Type.Literal(field_1.FieldType.NUMBER), typebox_1.Type.Literal(field_1.FieldType.DATE)]),
19
+ tableId: typebox_1.Type.String(),
20
+ })]);
11
21
  exports.UpdateFieldRequest = typebox_1.Type.Object({
12
22
  name: typebox_1.Type.String(),
13
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"fields.dto.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/tables/dto/fields.dto.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,oCAAoC;AAEvB,QAAA,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,cAAI,CAAC,IAAI,CAAC,iBAAS,CAAC;IAC1B,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;CACzB,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA"}
1
+ {"version":3,"file":"fields.dto.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/tables/dto/fields.dto.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,oCAAoC;AAGpC,MAAM,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,MAAM,CAAC;QAC5B,KAAK,EAAE,cAAI,CAAC,MAAM,EAAE;KACvB,CAAC,CAAC;CACN,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,cAAI,CAAC,KAAK,CAAC,CAAC,cAAI,CAAC,MAAM,CAAC;QACtD,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC,iBAAS,CAAC,eAAe,CAAC;QAC7C,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,kBAAkB;KAC3B,CAAC,EAAE,cAAI,CAAC,MAAM,CAAC;QACZ,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,iBAAS,CAAC,IAAI,CAAC,EAAE,cAAI,CAAC,OAAO,CAAC,iBAAS,CAAC,MAAM,CAAC,EAAE,cAAI,CAAC,OAAO,CAAC,iBAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9G,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;KACzB,CAAC,CAAC,CAAC,CAAA;AAES,QAAA,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA"}
@@ -2,15 +2,33 @@ import { Static } from '@sinclair/typebox';
2
2
  export declare enum FieldType {
3
3
  TEXT = "TEXT",
4
4
  NUMBER = "NUMBER",
5
- DATE = "DATE"
5
+ DATE = "DATE",
6
+ STATIC_DROPDOWN = "STATIC_DROPDOWN"
6
7
  }
7
- export declare const Field: import("@sinclair/typebox").TObject<{
8
+ export declare const Field: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
8
9
  name: import("@sinclair/typebox").TString;
9
- type: import("@sinclair/typebox").TEnum<typeof FieldType>;
10
+ type: import("@sinclair/typebox").TLiteral<FieldType.STATIC_DROPDOWN>;
10
11
  tableId: import("@sinclair/typebox").TString;
11
12
  projectId: import("@sinclair/typebox").TString;
13
+ data: import("@sinclair/typebox").TObject<{
14
+ options: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
15
+ value: import("@sinclair/typebox").TString;
16
+ }>>;
17
+ }>;
12
18
  id: import("@sinclair/typebox").TString;
13
19
  created: import("@sinclair/typebox").TString;
14
20
  updated: import("@sinclair/typebox").TString;
15
- }>;
21
+ }>, import("@sinclair/typebox").TObject<{
22
+ name: import("@sinclair/typebox").TString;
23
+ type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<FieldType.TEXT>, import("@sinclair/typebox").TLiteral<FieldType.NUMBER>, import("@sinclair/typebox").TLiteral<FieldType.DATE>]>;
24
+ tableId: import("@sinclair/typebox").TString;
25
+ projectId: import("@sinclair/typebox").TString;
26
+ id: import("@sinclair/typebox").TString;
27
+ created: import("@sinclair/typebox").TString;
28
+ updated: import("@sinclair/typebox").TString;
29
+ }>]>;
16
30
  export type Field = Static<typeof Field>;
31
+ export declare const StaticDropdownEmptyOption: {
32
+ label: string;
33
+ value: string;
34
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Field = exports.FieldType = void 0;
3
+ exports.StaticDropdownEmptyOption = exports.Field = exports.FieldType = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
5
  const common_1 = require("../common");
6
6
  var FieldType;
@@ -8,6 +8,15 @@ var FieldType;
8
8
  FieldType["TEXT"] = "TEXT";
9
9
  FieldType["NUMBER"] = "NUMBER";
10
10
  FieldType["DATE"] = "DATE";
11
+ FieldType["STATIC_DROPDOWN"] = "STATIC_DROPDOWN";
11
12
  })(FieldType || (exports.FieldType = FieldType = {}));
12
- exports.Field = typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { name: typebox_1.Type.String(), type: typebox_1.Type.Enum(FieldType), tableId: typebox_1.Type.String(), projectId: typebox_1.Type.String() }));
13
+ exports.Field = typebox_1.Type.Union([typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { name: typebox_1.Type.String(), type: typebox_1.Type.Literal(FieldType.STATIC_DROPDOWN), tableId: typebox_1.Type.String(), projectId: typebox_1.Type.String(), data: typebox_1.Type.Object({
14
+ options: typebox_1.Type.Array(typebox_1.Type.Object({
15
+ value: typebox_1.Type.String(),
16
+ })),
17
+ }) })), typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { name: typebox_1.Type.String(), type: typebox_1.Type.Union([typebox_1.Type.Literal(FieldType.TEXT), typebox_1.Type.Literal(FieldType.NUMBER), typebox_1.Type.Literal(FieldType.DATE)]), tableId: typebox_1.Type.String(), projectId: typebox_1.Type.String() }))]);
18
+ exports.StaticDropdownEmptyOption = {
19
+ label: '',
20
+ value: '',
21
+ };
13
22
  //# sourceMappingURL=field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/tables/field.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,sCAA2C;AAE3C,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,0BAAa,CAAA;IACb,8BAAiB,CAAA;IACjB,0BAAa,CAAA;AACjB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAEY,QAAA,KAAK,GAAG,cAAI,CAAC,MAAM,iCACzB,wBAAe,KAClB,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE,EACnB,IAAI,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAC1B,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE,EACtB,SAAS,EAAE,cAAI,CAAC,MAAM,EAAE,IAC1B,CAAA"}
1
+ {"version":3,"file":"field.js","sourceRoot":"","sources":["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