@wenlarge/communication 1.1.18 → 1.2.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.
|
@@ -131,12 +131,17 @@ export interface UpdateWorkflowStatusRequest {
|
|
|
131
131
|
export interface GetNodeExecutionLogRequest {
|
|
132
132
|
nodeIds: string[];
|
|
133
133
|
workflowId: string;
|
|
134
|
+
skip: number;
|
|
135
|
+
take: number;
|
|
134
136
|
}
|
|
135
137
|
export interface GetExecutionLogResponse {
|
|
136
|
-
|
|
138
|
+
data: ExecutionLogEntry[];
|
|
139
|
+
total: number;
|
|
137
140
|
}
|
|
138
141
|
export interface GetWorkflowExecutionLogRequest {
|
|
139
142
|
workflowId: string;
|
|
143
|
+
skip: number;
|
|
144
|
+
take: number;
|
|
140
145
|
}
|
|
141
146
|
export interface ExecutionLogEntry {
|
|
142
147
|
nodeId: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Struct } from "../generated/google/protobuf/struct";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function unwrapStruct(fields: Record<string, any>): Record<string, any>;
|
|
3
3
|
export declare function wrapStruct(obj: Record<string, any> | null | undefined): Struct | undefined;
|
|
@@ -1,44 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.unwrapStruct = unwrapStruct;
|
|
4
4
|
exports.wrapStruct = wrapStruct;
|
|
5
5
|
const struct_1 = require("../generated/google/protobuf/struct");
|
|
6
|
-
function
|
|
7
|
-
var _a, _b
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
function unwrapStruct(fields) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const result = {};
|
|
9
|
+
for (const key in fields) {
|
|
10
|
+
const value = fields[key];
|
|
11
|
+
if ("stringValue" in value)
|
|
12
|
+
result[key] = value.stringValue;
|
|
13
|
+
else if ("numberValue" in value)
|
|
14
|
+
result[key] = value.numberValue;
|
|
15
|
+
else if ("boolValue" in value)
|
|
16
|
+
result[key] = value.boolValue;
|
|
17
|
+
else if ("structValue" in value)
|
|
18
|
+
result[key] = unwrapStruct((_a = value.structValue.fields) !== null && _a !== void 0 ? _a : {});
|
|
19
|
+
else if ("listValue" in value)
|
|
20
|
+
result[key] = (_b = value.listValue.values) === null || _b === void 0 ? void 0 : _b.map((v) => unwrapStruct({ tmp: v }).tmp);
|
|
21
|
+
else
|
|
22
|
+
result[key] = null;
|
|
12
23
|
}
|
|
13
|
-
|
|
14
|
-
return value;
|
|
15
|
-
}
|
|
16
|
-
if ("stringValue" in value)
|
|
17
|
-
return value.stringValue;
|
|
18
|
-
if ("numberValue" in value)
|
|
19
|
-
return value.numberValue;
|
|
20
|
-
if ("boolValue" in value)
|
|
21
|
-
return value.boolValue;
|
|
22
|
-
if ("nullValue" in value)
|
|
23
|
-
return null;
|
|
24
|
-
if ("structValue" in value) {
|
|
25
|
-
return normalizeStructLike(value.structValue);
|
|
26
|
-
}
|
|
27
|
-
if ("listValue" in value) {
|
|
28
|
-
return ((_b = (_a = value.listValue) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : []).map(normalizeStructLike);
|
|
29
|
-
}
|
|
30
|
-
if ("fields" in value) {
|
|
31
|
-
const out = {};
|
|
32
|
-
for (const [k, v] of Object.entries((_c = value.fields) !== null && _c !== void 0 ? _c : {})) {
|
|
33
|
-
out[k] = normalizeStructLike(v);
|
|
34
|
-
}
|
|
35
|
-
return out;
|
|
36
|
-
}
|
|
37
|
-
const out = {};
|
|
38
|
-
for (const [k, v] of Object.entries(value)) {
|
|
39
|
-
out[k] = normalizeStructLike(v);
|
|
40
|
-
}
|
|
41
|
-
return out;
|
|
24
|
+
return result;
|
|
42
25
|
}
|
|
43
26
|
function wrapStruct(obj) {
|
|
44
27
|
if (obj == null)
|
package/package.json
CHANGED
package/proto/workflow.proto
CHANGED
|
@@ -154,14 +154,19 @@ message UpdateWorkflowStatusRequest {
|
|
|
154
154
|
message GetNodeExecutionLogRequest {
|
|
155
155
|
repeated string nodeIds = 1;
|
|
156
156
|
string workflowId =2;
|
|
157
|
+
int32 skip = 3;
|
|
158
|
+
int32 take = 4;
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
message GetExecutionLogResponse {
|
|
160
|
-
repeated ExecutionLogEntry
|
|
162
|
+
repeated ExecutionLogEntry data = 1;
|
|
163
|
+
int32 total = 2;
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
message GetWorkflowExecutionLogRequest{
|
|
164
167
|
string workflowId = 1;
|
|
168
|
+
int32 skip = 2;
|
|
169
|
+
int32 take = 3;
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
message ExecutionLogEntry {
|
|
@@ -147,14 +147,19 @@ export interface UpdateWorkflowStatusRequest {
|
|
|
147
147
|
export interface GetNodeExecutionLogRequest {
|
|
148
148
|
nodeIds: string[];
|
|
149
149
|
workflowId: string;
|
|
150
|
+
skip: number;
|
|
151
|
+
take: number;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
export interface GetExecutionLogResponse {
|
|
153
|
-
|
|
155
|
+
data: ExecutionLogEntry[];
|
|
156
|
+
total: number;
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
export interface GetWorkflowExecutionLogRequest {
|
|
157
160
|
workflowId: string;
|
|
161
|
+
skip: number;
|
|
162
|
+
take: number;
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
export interface ExecutionLogEntry {
|