pyrus-api 3.0.0 → 3.1.0
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/README.md +3 -1
- package/build/cjs/index.cjs +4 -0
- package/build/esm/index.js +4 -0
- package/build/types/index.d.ts +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,7 @@ import {ApprovalChoice} from "pyrus-api";
|
|
|
88
88
|
```typescript
|
|
89
89
|
const taskId = 2512;
|
|
90
90
|
const fieldToAdd: FormFieldTable = {
|
|
91
|
+
id: 1,
|
|
91
92
|
type: FormFieldType.Table,
|
|
92
93
|
value: [
|
|
93
94
|
{
|
|
@@ -98,7 +99,8 @@ const fieldToAdd: FormFieldTable = {
|
|
|
98
99
|
name: "Comment",
|
|
99
100
|
value: "That's right"
|
|
100
101
|
}
|
|
101
|
-
]
|
|
102
|
+
],
|
|
103
|
+
position: 1
|
|
102
104
|
}
|
|
103
105
|
]
|
|
104
106
|
};
|
package/build/cjs/index.cjs
CHANGED
|
@@ -71,6 +71,7 @@ exports.OperatorId = void 0;
|
|
|
71
71
|
OperatorId[OperatorId["Range"] = 5] = "Range";
|
|
72
72
|
OperatorId[OperatorId["MatchPrefix"] = 6] = "MatchPrefix";
|
|
73
73
|
OperatorId[OperatorId["IsEmpty"] = 7] = "IsEmpty";
|
|
74
|
+
OperatorId[OperatorId["Exists"] = 8] = "Exists";
|
|
74
75
|
})(exports.OperatorId || (exports.OperatorId = {}));
|
|
75
76
|
|
|
76
77
|
function toSearchParams(request) {
|
|
@@ -164,6 +165,9 @@ function processFilters(filters) {
|
|
|
164
165
|
case exports.OperatorId.IsEmpty:
|
|
165
166
|
prev[`fld${field_id}`] = "empty";
|
|
166
167
|
break;
|
|
168
|
+
case exports.OperatorId.Exists:
|
|
169
|
+
prev[`fld${field_id}`] = "*";
|
|
170
|
+
break;
|
|
167
171
|
default:
|
|
168
172
|
return prev;
|
|
169
173
|
}
|
package/build/esm/index.js
CHANGED
|
@@ -69,6 +69,7 @@ var OperatorId;
|
|
|
69
69
|
OperatorId[OperatorId["Range"] = 5] = "Range";
|
|
70
70
|
OperatorId[OperatorId["MatchPrefix"] = 6] = "MatchPrefix";
|
|
71
71
|
OperatorId[OperatorId["IsEmpty"] = 7] = "IsEmpty";
|
|
72
|
+
OperatorId[OperatorId["Exists"] = 8] = "Exists";
|
|
72
73
|
})(OperatorId || (OperatorId = {}));
|
|
73
74
|
|
|
74
75
|
function toSearchParams(request) {
|
|
@@ -162,6 +163,9 @@ function processFilters(filters) {
|
|
|
162
163
|
case OperatorId.IsEmpty:
|
|
163
164
|
prev[`fld${field_id}`] = "empty";
|
|
164
165
|
break;
|
|
166
|
+
case OperatorId.Exists:
|
|
167
|
+
prev[`fld${field_id}`] = "*";
|
|
168
|
+
break;
|
|
165
169
|
default:
|
|
166
170
|
return prev;
|
|
167
171
|
}
|
package/build/types/index.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ declare module "pyrus-api" {
|
|
|
6
6
|
IsIn = 4,
|
|
7
7
|
Range = 5,
|
|
8
8
|
MatchPrefix = 6,
|
|
9
|
-
IsEmpty = 7
|
|
9
|
+
IsEmpty = 7,
|
|
10
|
+
Exists = 8
|
|
10
11
|
}
|
|
11
12
|
export type FormFilter = {
|
|
12
13
|
field_id: number;
|
|
13
14
|
operator_id: OperatorId;
|
|
14
|
-
values
|
|
15
|
+
values?: string[];
|
|
15
16
|
};
|
|
16
17
|
export type CatalogHeader = {
|
|
17
18
|
name: string;
|
|
@@ -529,6 +530,7 @@ declare module "pyrus-api" {
|
|
|
529
530
|
cells?: FormField[];
|
|
530
531
|
delete?: boolean;
|
|
531
532
|
deleted?: boolean;
|
|
533
|
+
position?: number;
|
|
532
534
|
};
|
|
533
535
|
export type FormFieldText = FormFieldBase & {
|
|
534
536
|
type?: typeof FormFieldType.Text;
|