@byted-apaas/server-sdk-node 1.0.11 → 1.0.12
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 +1 -1
- package/request/innerapi.js +14 -10
- package/request/openapi.js +14 -10
package/package.json
CHANGED
package/request/innerapi.js
CHANGED
|
@@ -52,7 +52,7 @@ async function createRecordBySync(objectApiName, record) {
|
|
|
52
52
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
53
53
|
param.ObjectAPIAlias = objectApiName;
|
|
54
54
|
param.Data = utils.stringify(record);
|
|
55
|
-
param.Operator = BigInt(
|
|
55
|
+
param.Operator = BigInt(utils.getUserIDFromCtx());
|
|
56
56
|
if (task_id) {
|
|
57
57
|
param.TaskID = BigInt(task_id);
|
|
58
58
|
}
|
|
@@ -82,7 +82,7 @@ async function updateRecordBySync(objectApiName, recordID, record) {
|
|
|
82
82
|
param.ObjectAPIAlias = objectApiName;
|
|
83
83
|
param.RecordID = BigInt(recordID);
|
|
84
84
|
param.Data = utils.stringify(record);
|
|
85
|
-
param.Operator = BigInt(
|
|
85
|
+
param.Operator = BigInt(utils.getUserIDFromCtx());
|
|
86
86
|
if (task_id) {
|
|
87
87
|
param.TaskID = BigInt(task_id);
|
|
88
88
|
}
|
|
@@ -111,7 +111,7 @@ async function deleteRecordBySync(objectApiName, recordID) {
|
|
|
111
111
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
112
112
|
param.ObjectAPIAlias = objectApiName;
|
|
113
113
|
param.RecordID = BigInt(recordID);
|
|
114
|
-
param.Operator = BigInt(
|
|
114
|
+
param.Operator = BigInt(utils.getUserIDFromCtx());
|
|
115
115
|
if (task_id) {
|
|
116
116
|
param.TaskID = BigInt(task_id);
|
|
117
117
|
}
|
|
@@ -140,7 +140,7 @@ async function createRecordsByAsync(objectApiName, records) {
|
|
|
140
140
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
141
141
|
param.ObjectAPIAlias = objectApiName;
|
|
142
142
|
param.Data = utils.stringify(records);
|
|
143
|
-
param.OperatorID = BigInt(
|
|
143
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
144
144
|
if (task_id) {
|
|
145
145
|
param.AutomationTaskID = BigInt(task_id);
|
|
146
146
|
}
|
|
@@ -169,7 +169,7 @@ async function updateRecordsByAsync(objectApiName, recordMap) {
|
|
|
169
169
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
170
170
|
param.ObjectAPIAlias = objectApiName;
|
|
171
171
|
param.Data = utils.stringify(recordMap);
|
|
172
|
-
param.OperatorID = BigInt(
|
|
172
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
173
173
|
if (task_id) {
|
|
174
174
|
param.AutomationTaskID = BigInt(task_id);
|
|
175
175
|
}
|
|
@@ -202,7 +202,7 @@ async function deleteRecordsByAsync(objectApiName, recordIDs) {
|
|
|
202
202
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
203
203
|
param.ObjectAPIAlias = objectApiName;
|
|
204
204
|
param.RecordIDList = recordIDList;
|
|
205
|
-
param.OperatorID = BigInt(
|
|
205
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
206
206
|
if (task_id) {
|
|
207
207
|
param.AutomationTaskID = BigInt(task_id);
|
|
208
208
|
}
|
|
@@ -231,7 +231,8 @@ async function createRecordsBySync(objectApiName, records) {
|
|
|
231
231
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
232
232
|
param.ObjectAPIAlias = objectApiName;
|
|
233
233
|
param.Data = utils.stringify(records);
|
|
234
|
-
param.OperatorID = BigInt(
|
|
234
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
235
|
+
param.SetSystemField = 2;
|
|
235
236
|
if (task_id) {
|
|
236
237
|
param.AutomationTaskID = BigInt(task_id);
|
|
237
238
|
}
|
|
@@ -271,7 +272,8 @@ async function updateRecordsBySync(objectApiName, recordMap) {
|
|
|
271
272
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
272
273
|
param.ObjectAPIAlias = objectApiName;
|
|
273
274
|
param.Data = utils.stringify(recordMap);
|
|
274
|
-
param.OperatorID = BigInt(
|
|
275
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
276
|
+
param.SetSystemField = 2;
|
|
275
277
|
if (task_id) {
|
|
276
278
|
param.AutomationTaskID = BigInt(task_id);
|
|
277
279
|
}
|
|
@@ -308,7 +310,8 @@ async function deleteRecordsBySync(objectApiName, recordIDs) {
|
|
|
308
310
|
param.Namespace = await (0, common_1.getNamespaceForOpenAndFaaSSDK)();
|
|
309
311
|
param.ObjectAPIAlias = objectApiName;
|
|
310
312
|
param.RecordIDs = recordIDList;
|
|
311
|
-
param.OperatorID = BigInt(
|
|
313
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
314
|
+
param.SetSystemField = 2;
|
|
312
315
|
if (task_id) {
|
|
313
316
|
param.AutomationTaskID = BigInt(task_id);
|
|
314
317
|
}
|
|
@@ -723,7 +726,8 @@ async function modifyRecordsWithTransaction(placeholders, operations) {
|
|
|
723
726
|
param.Placeholders = ph;
|
|
724
727
|
// TODO: change operations type
|
|
725
728
|
param.Operations = operations;
|
|
726
|
-
param.OperatorID = BigInt(
|
|
729
|
+
param.OperatorID = BigInt(utils.getUserIDFromCtx());
|
|
730
|
+
param.SetSystemField = 1;
|
|
727
731
|
const taskID = utils.getTriggerTaskID();
|
|
728
732
|
if (taskID) {
|
|
729
733
|
param.TaskID = BigInt(taskID);
|
package/request/openapi.js
CHANGED
|
@@ -44,7 +44,7 @@ async function createRecordBySync(objectApiName, record) {
|
|
|
44
44
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
45
45
|
// 3.请求
|
|
46
46
|
options.json = {
|
|
47
|
-
"operator":
|
|
47
|
+
"operator": utils.getUserIDFromCtx(),
|
|
48
48
|
"data": record,
|
|
49
49
|
};
|
|
50
50
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -71,7 +71,7 @@ async function updateRecordBySync(objectApiName, recordID, record) {
|
|
|
71
71
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
72
72
|
// 3.请求
|
|
73
73
|
options.json = {
|
|
74
|
-
"operator":
|
|
74
|
+
"operator": utils.getUserIDFromCtx(),
|
|
75
75
|
"record_id": recordID,
|
|
76
76
|
"data": record,
|
|
77
77
|
};
|
|
@@ -92,7 +92,7 @@ async function deleteRecordBySync(objectApiName, recordID) {
|
|
|
92
92
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
93
93
|
// 3.请求
|
|
94
94
|
options.json = {
|
|
95
|
-
"operator":
|
|
95
|
+
"operator": utils.getUserIDFromCtx(),
|
|
96
96
|
"record_id": recordID,
|
|
97
97
|
};
|
|
98
98
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -108,7 +108,7 @@ async function createRecordsByAsync(objectApiName, records) {
|
|
|
108
108
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
109
109
|
// 2.请求
|
|
110
110
|
options.json = {
|
|
111
|
-
"operator":
|
|
111
|
+
"operator": utils.getUserIDFromCtx(),
|
|
112
112
|
"data": records,
|
|
113
113
|
};
|
|
114
114
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -124,7 +124,7 @@ async function updateRecordsByAsync(objectApiName, recordMap) {
|
|
|
124
124
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
125
125
|
// 2.请求
|
|
126
126
|
options.json = {
|
|
127
|
-
"operator":
|
|
127
|
+
"operator": utils.getUserIDFromCtx(),
|
|
128
128
|
"data": recordMap,
|
|
129
129
|
};
|
|
130
130
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -140,7 +140,7 @@ async function deleteRecordsByAsync(objectApiName, recordIDs) {
|
|
|
140
140
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
141
141
|
// 2.请求
|
|
142
142
|
options.json = {
|
|
143
|
-
"operator":
|
|
143
|
+
"operator": utils.getUserIDFromCtx(),
|
|
144
144
|
"record_id_list": recordIDs,
|
|
145
145
|
};
|
|
146
146
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -156,7 +156,8 @@ async function createRecordsBySync(objectApiName, records) {
|
|
|
156
156
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
157
157
|
// 2.请求
|
|
158
158
|
options.json = {
|
|
159
|
-
"operator":
|
|
159
|
+
"operator": utils.getUserIDFromCtx(),
|
|
160
|
+
"set_system_mod": 2,
|
|
160
161
|
"data": records,
|
|
161
162
|
};
|
|
162
163
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -172,7 +173,8 @@ async function updateRecordsBySync(objectApiName, recordMap) {
|
|
|
172
173
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
173
174
|
// 2.请求
|
|
174
175
|
options.json = {
|
|
175
|
-
"operator":
|
|
176
|
+
"operator": utils.getUserIDFromCtx(),
|
|
177
|
+
"set_system_mod": 2,
|
|
176
178
|
"data": recordMap,
|
|
177
179
|
};
|
|
178
180
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -188,7 +190,8 @@ async function deleteRecordsBySync(objectApiName, recordIDs) {
|
|
|
188
190
|
urlPath = urlPath.replace(replaceKeys.objectApiName, objectApiName);
|
|
189
191
|
// 2.请求
|
|
190
192
|
options.json = {
|
|
191
|
-
"operator":
|
|
193
|
+
"operator": utils.getUserIDFromCtx(),
|
|
194
|
+
"set_system_mod": 2,
|
|
192
195
|
"record_id_list": recordIDs,
|
|
193
196
|
};
|
|
194
197
|
let task_id = utils.getTriggerTaskID();
|
|
@@ -489,7 +492,8 @@ async function modifyRecordsWithTransaction(placeholders, operations) {
|
|
|
489
492
|
options.json = {
|
|
490
493
|
"placeholders": placeholders,
|
|
491
494
|
"operations": operations,
|
|
492
|
-
"operatorId":
|
|
495
|
+
"operatorId": utils.getUserIDFromCtx(),
|
|
496
|
+
"setSystemField": 1,
|
|
493
497
|
};
|
|
494
498
|
let taskId = utils.getTriggerTaskID();
|
|
495
499
|
if (taskId) {
|