@longvansoftware/service-js-client 2.3.3 → 2.3.5
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/dist/src/graphql/auth/queries.d.ts +1 -0
- package/dist/src/graphql/auth/queries.js +13 -1
- package/dist/src/graphql/computing/mutations.js +14 -28
- package/dist/src/graphql/computing/queries.js +6 -6
- package/dist/src/graphql/product/queries.d.ts +0 -1
- package/dist/src/graphql/product/queries.js +1 -19
- package/dist/src/graphql/storage_s3/mutations.js +44 -90
- package/dist/src/graphql/storage_s3/queries.js +18 -18
- package/dist/src/lib/auth/index.d.ts +1 -0
- package/dist/src/lib/auth/index.js +17 -0
- package/dist/src/lib/computing/index.d.ts +14 -14
- package/dist/src/lib/computing/index.js +14 -31
- package/dist/src/lib/product/index.d.ts +0 -1
- package/dist/src/lib/product/index.js +0 -18
- package/dist/src/lib/storage_s3/index.d.ts +34 -34
- package/dist/src/lib/storage_s3/index.js +45 -78
- package/dist/src/types/computing.d.ts +0 -2
- package/package.json +1 -1
|
@@ -49,12 +49,11 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
getListBucketByS3UserId(s3UserId,
|
|
52
|
+
getListBucketByS3UserId(s3UserId, fields) {
|
|
53
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
const query = (0, queries_1.GET_LIST_BUCKET_BY_S3_USER_ID)(fields);
|
|
55
55
|
const variables = {
|
|
56
56
|
s3UserId,
|
|
57
|
-
serviceId
|
|
58
57
|
};
|
|
59
58
|
try {
|
|
60
59
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -66,14 +65,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
66
65
|
}
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
|
-
getListObject(s3UserId, bucketId, key,
|
|
68
|
+
getListObject(s3UserId, bucketId, key, fields) {
|
|
70
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
70
|
const query = (0, queries_1.GET_LIST_OBJECT)(fields);
|
|
72
71
|
const variables = {
|
|
73
72
|
s3UserId,
|
|
74
73
|
bucketId,
|
|
75
74
|
key,
|
|
76
|
-
serviceId
|
|
77
75
|
};
|
|
78
76
|
try {
|
|
79
77
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -85,7 +83,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
85
83
|
}
|
|
86
84
|
});
|
|
87
85
|
}
|
|
88
|
-
uploadFolder(userId, bucketId, fileInfo, basePrefix,
|
|
86
|
+
uploadFolder(userId, bucketId, fileInfo, basePrefix, fields) {
|
|
89
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
88
|
const mutation = (0, mutations_1.UPLOAD_FOLDER)(fields);
|
|
91
89
|
const variables = {
|
|
@@ -93,7 +91,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
93
91
|
bucketId,
|
|
94
92
|
fileInfo,
|
|
95
93
|
basePrefix,
|
|
96
|
-
serviceId
|
|
97
94
|
};
|
|
98
95
|
console.log('variables', variables);
|
|
99
96
|
try {
|
|
@@ -124,7 +121,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
124
121
|
}
|
|
125
122
|
});
|
|
126
123
|
}
|
|
127
|
-
updateAclPermissionFile(s3UserId, bucketId, key, isPublic,
|
|
124
|
+
updateAclPermissionFile(s3UserId, bucketId, key, isPublic, fields) {
|
|
128
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
126
|
const mutation = (0, mutations_1.UPDATE_ACL_PERMISSION_FILE)(fields);
|
|
130
127
|
const variables = {
|
|
@@ -132,7 +129,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
132
129
|
bucketId,
|
|
133
130
|
key,
|
|
134
131
|
isPublic,
|
|
135
|
-
serviceId
|
|
136
132
|
};
|
|
137
133
|
try {
|
|
138
134
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -144,7 +140,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
144
140
|
}
|
|
145
141
|
});
|
|
146
142
|
}
|
|
147
|
-
renameFile(s3UserId, bucketId, key, fileNewName,
|
|
143
|
+
renameFile(s3UserId, bucketId, key, fileNewName, fields) {
|
|
148
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
145
|
const mutation = (0, mutations_1.RENAME_FILE)(fields);
|
|
150
146
|
const variables = {
|
|
@@ -152,7 +148,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
152
148
|
bucketId,
|
|
153
149
|
key,
|
|
154
150
|
fileNewName,
|
|
155
|
-
serviceId
|
|
156
151
|
};
|
|
157
152
|
try {
|
|
158
153
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -164,7 +159,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
164
159
|
}
|
|
165
160
|
});
|
|
166
161
|
}
|
|
167
|
-
shareLinkFileByTime(s3UserId, bucketId, key, quantityHour
|
|
162
|
+
shareLinkFileByTime(s3UserId, bucketId, key, quantityHour) {
|
|
168
163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
169
164
|
const mutation = mutations_1.SHARE_LINK_FILE_BY_TIME;
|
|
170
165
|
const variables = {
|
|
@@ -172,7 +167,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
172
167
|
bucketId,
|
|
173
168
|
key,
|
|
174
169
|
quantityHour,
|
|
175
|
-
serviceId
|
|
176
170
|
};
|
|
177
171
|
try {
|
|
178
172
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -184,7 +178,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
184
178
|
}
|
|
185
179
|
});
|
|
186
180
|
}
|
|
187
|
-
copyFile(s3UserId, bucketId, srcFileKey, dstFileKey,
|
|
181
|
+
copyFile(s3UserId, bucketId, srcFileKey, dstFileKey, fields) {
|
|
188
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
189
183
|
const mutation = (0, mutations_1.COPY_FILE)(fields);
|
|
190
184
|
const variables = {
|
|
@@ -192,7 +186,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
192
186
|
bucketId,
|
|
193
187
|
srcFileKey,
|
|
194
188
|
dstFileKey,
|
|
195
|
-
serviceId
|
|
196
189
|
};
|
|
197
190
|
try {
|
|
198
191
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -204,7 +197,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
204
197
|
}
|
|
205
198
|
});
|
|
206
199
|
}
|
|
207
|
-
moveFile(s3UserId, bucketId, srcFileKey, dstFileKey,
|
|
200
|
+
moveFile(s3UserId, bucketId, srcFileKey, dstFileKey, fields) {
|
|
208
201
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
202
|
const mutation = (0, mutations_1.MOVE_FILE)(fields);
|
|
210
203
|
const variables = {
|
|
@@ -212,7 +205,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
212
205
|
bucketId,
|
|
213
206
|
srcFileKey,
|
|
214
207
|
dstFileKey,
|
|
215
|
-
serviceId
|
|
216
208
|
};
|
|
217
209
|
try {
|
|
218
210
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -224,14 +216,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
224
216
|
}
|
|
225
217
|
});
|
|
226
218
|
}
|
|
227
|
-
removeFile(s3UserId, bucketId, keys,
|
|
219
|
+
removeFile(s3UserId, bucketId, keys, fields) {
|
|
228
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
229
221
|
const mutation = (0, mutations_1.REMOVE_FILE)(fields);
|
|
230
222
|
const variables = {
|
|
231
223
|
s3UserId,
|
|
232
224
|
bucketId,
|
|
233
225
|
keys,
|
|
234
|
-
serviceId
|
|
235
226
|
};
|
|
236
227
|
try {
|
|
237
228
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -243,7 +234,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
243
234
|
}
|
|
244
235
|
});
|
|
245
236
|
}
|
|
246
|
-
createFolder(s3UserId, bucketId, folderName, key,
|
|
237
|
+
createFolder(s3UserId, bucketId, folderName, key, fields) {
|
|
247
238
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
239
|
const mutation = (0, mutations_1.CREATE_FOLDER)(fields);
|
|
249
240
|
const variables = {
|
|
@@ -251,7 +242,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
251
242
|
bucketId,
|
|
252
243
|
folderName,
|
|
253
244
|
key,
|
|
254
|
-
serviceId
|
|
255
245
|
};
|
|
256
246
|
try {
|
|
257
247
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -263,14 +253,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
263
253
|
}
|
|
264
254
|
});
|
|
265
255
|
}
|
|
266
|
-
removeFolder(s3UserId, bucketId, key,
|
|
256
|
+
removeFolder(s3UserId, bucketId, key, fields) {
|
|
267
257
|
return __awaiter(this, void 0, void 0, function* () {
|
|
268
258
|
const mutation = (0, mutations_1.REMOVE_FOLDER)(fields);
|
|
269
259
|
const variables = {
|
|
270
260
|
s3UserId,
|
|
271
261
|
bucketId,
|
|
272
262
|
key,
|
|
273
|
-
serviceId
|
|
274
263
|
};
|
|
275
264
|
try {
|
|
276
265
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -282,7 +271,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
282
271
|
}
|
|
283
272
|
});
|
|
284
273
|
}
|
|
285
|
-
createBucket(s3UserId, bucketName, internalId, randomInternalId, enableObjectLock, enableBucketVersioning, byUser,
|
|
274
|
+
createBucket(s3UserId, bucketName, internalId, randomInternalId, enableObjectLock, enableBucketVersioning, byUser, fields) {
|
|
286
275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
287
276
|
const mutation = (0, mutations_1.CREATE_BUCKET)(fields);
|
|
288
277
|
const variables = {
|
|
@@ -293,7 +282,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
293
282
|
enableObjectLock,
|
|
294
283
|
enableBucketVersioning,
|
|
295
284
|
byUser,
|
|
296
|
-
serviceId
|
|
297
285
|
};
|
|
298
286
|
try {
|
|
299
287
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -305,14 +293,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
305
293
|
}
|
|
306
294
|
});
|
|
307
295
|
}
|
|
308
|
-
renameBucket(bucketId, bucketName, updateBy,
|
|
296
|
+
renameBucket(bucketId, bucketName, updateBy, fields) {
|
|
309
297
|
return __awaiter(this, void 0, void 0, function* () {
|
|
310
298
|
const mutation = (0, mutations_1.RENAME_BUCKET)(fields);
|
|
311
299
|
const variables = {
|
|
312
300
|
bucketId,
|
|
313
301
|
bucketName,
|
|
314
|
-
updateBy
|
|
315
|
-
serviceId
|
|
302
|
+
updateBy
|
|
316
303
|
};
|
|
317
304
|
try {
|
|
318
305
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -324,13 +311,12 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
324
311
|
}
|
|
325
312
|
});
|
|
326
313
|
}
|
|
327
|
-
deleteBucket(bucketId, updateBy,
|
|
314
|
+
deleteBucket(bucketId, updateBy, fields) {
|
|
328
315
|
return __awaiter(this, void 0, void 0, function* () {
|
|
329
316
|
const mutation = (0, mutations_1.DELETE_BUCKET)(fields);
|
|
330
317
|
const variables = {
|
|
331
318
|
bucketId,
|
|
332
319
|
updateBy,
|
|
333
|
-
serviceId
|
|
334
320
|
};
|
|
335
321
|
try {
|
|
336
322
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -342,7 +328,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
342
328
|
}
|
|
343
329
|
});
|
|
344
330
|
}
|
|
345
|
-
updateAclPermissionBucket(s3UserId, bucketId, isPublic, updateBy,
|
|
331
|
+
updateAclPermissionBucket(s3UserId, bucketId, isPublic, updateBy, fields) {
|
|
346
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
347
333
|
const mutation = (0, mutations_1.UPDATE_ACL_PERMISSION_BUCKET)(fields);
|
|
348
334
|
const variables = {
|
|
@@ -350,7 +336,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
350
336
|
bucketId,
|
|
351
337
|
isPublic,
|
|
352
338
|
updateBy,
|
|
353
|
-
serviceId
|
|
354
339
|
};
|
|
355
340
|
try {
|
|
356
341
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -362,7 +347,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
362
347
|
}
|
|
363
348
|
});
|
|
364
349
|
}
|
|
365
|
-
updateBucketVersioning(s3UserId, bucketId, isOn, updateBy,
|
|
350
|
+
updateBucketVersioning(s3UserId, bucketId, isOn, updateBy, fields) {
|
|
366
351
|
return __awaiter(this, void 0, void 0, function* () {
|
|
367
352
|
const mutation = (0, mutations_1.UPDATE_BUCKET_VERSIONING)(fields);
|
|
368
353
|
const variables = {
|
|
@@ -370,7 +355,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
370
355
|
bucketId,
|
|
371
356
|
isOn,
|
|
372
357
|
updateBy,
|
|
373
|
-
serviceId
|
|
374
358
|
};
|
|
375
359
|
try {
|
|
376
360
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -382,13 +366,12 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
382
366
|
}
|
|
383
367
|
});
|
|
384
368
|
}
|
|
385
|
-
getListFileTrash(s3UserId, bucketId,
|
|
369
|
+
getListFileTrash(s3UserId, bucketId, fields) {
|
|
386
370
|
return __awaiter(this, void 0, void 0, function* () {
|
|
387
371
|
const query = (0, queries_1.GET_LIST_FILE_TRASH)(fields);
|
|
388
372
|
const variables = {
|
|
389
373
|
s3UserId,
|
|
390
374
|
bucketId,
|
|
391
|
-
serviceId
|
|
392
375
|
};
|
|
393
376
|
try {
|
|
394
377
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -400,15 +383,14 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
400
383
|
}
|
|
401
384
|
});
|
|
402
385
|
}
|
|
403
|
-
restoreFileTrash(s3UserId, bucketId, key, versionId,
|
|
386
|
+
restoreFileTrash(s3UserId, bucketId, key, versionId, fields) {
|
|
404
387
|
return __awaiter(this, void 0, void 0, function* () {
|
|
405
388
|
const mutation = (0, mutations_1.RESTORE_FILE_TRASH)(fields);
|
|
406
389
|
const variables = {
|
|
407
390
|
s3UserId,
|
|
408
391
|
bucketId,
|
|
409
392
|
key,
|
|
410
|
-
versionId
|
|
411
|
-
serviceId
|
|
393
|
+
versionId
|
|
412
394
|
};
|
|
413
395
|
try {
|
|
414
396
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -420,14 +402,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
420
402
|
}
|
|
421
403
|
});
|
|
422
404
|
}
|
|
423
|
-
removeFileTrash(s3UserId, bucketId, files,
|
|
405
|
+
removeFileTrash(s3UserId, bucketId, files, fields) {
|
|
424
406
|
return __awaiter(this, void 0, void 0, function* () {
|
|
425
407
|
const mutation = (0, mutations_1.REMOVE_FILE_TRASH)(fields);
|
|
426
408
|
const variables = {
|
|
427
409
|
s3UserId,
|
|
428
410
|
bucketId,
|
|
429
|
-
files
|
|
430
|
-
serviceId
|
|
411
|
+
files
|
|
431
412
|
};
|
|
432
413
|
try {
|
|
433
414
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -439,12 +420,11 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
439
420
|
}
|
|
440
421
|
});
|
|
441
422
|
}
|
|
442
|
-
getListS3DomainByS3UserId(s3UserId,
|
|
423
|
+
getListS3DomainByS3UserId(s3UserId, fields) {
|
|
443
424
|
return __awaiter(this, void 0, void 0, function* () {
|
|
444
425
|
const query = (0, queries_1.GET_LIST_S3_DOMAIN_BY_S3_USER_ID)(fields);
|
|
445
426
|
const variables = {
|
|
446
427
|
s3UserId,
|
|
447
|
-
serviceId
|
|
448
428
|
};
|
|
449
429
|
try {
|
|
450
430
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -456,14 +436,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
456
436
|
}
|
|
457
437
|
});
|
|
458
438
|
}
|
|
459
|
-
addS3Domain(s3UserId, domain, byUser,
|
|
439
|
+
addS3Domain(s3UserId, domain, byUser, fields) {
|
|
460
440
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
441
|
const mutation = (0, mutations_1.ADD_S3_DOMAIN)(fields);
|
|
462
442
|
const variables = {
|
|
463
443
|
s3UserId,
|
|
464
444
|
domain,
|
|
465
445
|
byUser,
|
|
466
|
-
serviceId
|
|
467
446
|
};
|
|
468
447
|
try {
|
|
469
448
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -475,14 +454,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
475
454
|
}
|
|
476
455
|
});
|
|
477
456
|
}
|
|
478
|
-
removeS3Domain(s3UserId, domainId, byUser,
|
|
457
|
+
removeS3Domain(s3UserId, domainId, byUser, fields) {
|
|
479
458
|
return __awaiter(this, void 0, void 0, function* () {
|
|
480
459
|
const mutation = (0, mutations_1.REMOVE_S3_DOMAIN)(fields);
|
|
481
460
|
const variables = {
|
|
482
461
|
s3UserId,
|
|
483
462
|
domainId,
|
|
484
463
|
byUser,
|
|
485
|
-
serviceId
|
|
486
464
|
};
|
|
487
465
|
try {
|
|
488
466
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -494,13 +472,12 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
494
472
|
}
|
|
495
473
|
});
|
|
496
474
|
}
|
|
497
|
-
getListCorsByS3UserId(s3UserId, bucketId,
|
|
475
|
+
getListCorsByS3UserId(s3UserId, bucketId, fields) {
|
|
498
476
|
return __awaiter(this, void 0, void 0, function* () {
|
|
499
477
|
const query = (0, queries_1.GET_LIST_CORS_BY_S3_USER_ID)(fields);
|
|
500
478
|
const variables = {
|
|
501
479
|
s3UserId,
|
|
502
480
|
bucketId,
|
|
503
|
-
serviceId
|
|
504
481
|
};
|
|
505
482
|
try {
|
|
506
483
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -512,7 +489,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
512
489
|
}
|
|
513
490
|
});
|
|
514
491
|
}
|
|
515
|
-
addCorsBucket(s3UserId, bucketId, allowedMethods, allowedOrigins, allowedHeaders, exposeHeaders, maxAgeSeconds, updateBy,
|
|
492
|
+
addCorsBucket(s3UserId, bucketId, allowedMethods, allowedOrigins, allowedHeaders, exposeHeaders, maxAgeSeconds, updateBy, fields) {
|
|
516
493
|
return __awaiter(this, void 0, void 0, function* () {
|
|
517
494
|
const mutation = (0, mutations_1.ADD_CORS_BUCKET)(fields);
|
|
518
495
|
const variables = {
|
|
@@ -524,7 +501,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
524
501
|
exposeHeaders,
|
|
525
502
|
maxAgeSeconds,
|
|
526
503
|
updateBy,
|
|
527
|
-
serviceId
|
|
528
504
|
};
|
|
529
505
|
try {
|
|
530
506
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -536,10 +512,11 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
536
512
|
}
|
|
537
513
|
});
|
|
538
514
|
}
|
|
539
|
-
updateCorsBucket(bucketId, corsId, allowedMethods, allowedOrigins, allowedHeaders, exposeHeaders, maxAgeSeconds, updateBy,
|
|
515
|
+
updateCorsBucket(s3UserId, bucketId, corsId, allowedMethods, allowedOrigins, allowedHeaders, exposeHeaders, maxAgeSeconds, updateBy, fields) {
|
|
540
516
|
return __awaiter(this, void 0, void 0, function* () {
|
|
541
517
|
const mutation = (0, mutations_1.UPDATE_CORS_BUCKET)(fields);
|
|
542
518
|
const variables = {
|
|
519
|
+
s3UserId,
|
|
543
520
|
bucketId,
|
|
544
521
|
corsId,
|
|
545
522
|
allowedMethods,
|
|
@@ -548,7 +525,6 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
548
525
|
exposeHeaders,
|
|
549
526
|
maxAgeSeconds,
|
|
550
527
|
updateBy,
|
|
551
|
-
serviceId
|
|
552
528
|
};
|
|
553
529
|
try {
|
|
554
530
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -560,14 +536,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
560
536
|
}
|
|
561
537
|
});
|
|
562
538
|
}
|
|
563
|
-
removeCorsBucket(bucketId, corsId, updateBy,
|
|
539
|
+
removeCorsBucket(bucketId, corsId, updateBy, fields) {
|
|
564
540
|
return __awaiter(this, void 0, void 0, function* () {
|
|
565
541
|
const mutation = (0, mutations_1.REMOVE_CORS_BUCKET)(fields);
|
|
566
542
|
const variables = {
|
|
567
543
|
bucketId,
|
|
568
544
|
corsId,
|
|
569
545
|
updateBy,
|
|
570
|
-
serviceId
|
|
571
546
|
};
|
|
572
547
|
try {
|
|
573
548
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -579,14 +554,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
579
554
|
}
|
|
580
555
|
});
|
|
581
556
|
}
|
|
582
|
-
getListFileOtherVersion(s3UserId, bucketId, key,
|
|
557
|
+
getListFileOtherVersion(s3UserId, bucketId, key, fields) {
|
|
583
558
|
return __awaiter(this, void 0, void 0, function* () {
|
|
584
559
|
const query = (0, queries_1.GET_LIST_FILE_OTHER_VERSION)(fields);
|
|
585
560
|
const variables = {
|
|
586
561
|
s3UserId,
|
|
587
562
|
bucketId,
|
|
588
563
|
key,
|
|
589
|
-
serviceId
|
|
590
564
|
};
|
|
591
565
|
try {
|
|
592
566
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -598,15 +572,14 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
598
572
|
}
|
|
599
573
|
});
|
|
600
574
|
}
|
|
601
|
-
restoreFileOtherVersion(s3UserId, bucketId, key, versionId,
|
|
575
|
+
restoreFileOtherVersion(s3UserId, bucketId, key, versionId, fields) {
|
|
602
576
|
return __awaiter(this, void 0, void 0, function* () {
|
|
603
577
|
const mutation = (0, mutations_1.RESTORE_FILE_OTHER_VERSION)(fields);
|
|
604
578
|
const variables = {
|
|
605
579
|
s3UserId,
|
|
606
580
|
bucketId,
|
|
607
581
|
key,
|
|
608
|
-
versionId
|
|
609
|
-
serviceId
|
|
582
|
+
versionId
|
|
610
583
|
};
|
|
611
584
|
try {
|
|
612
585
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -618,15 +591,14 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
618
591
|
}
|
|
619
592
|
});
|
|
620
593
|
}
|
|
621
|
-
removeFileOtherVersion(s3UserId, bucketId, key, versionId,
|
|
594
|
+
removeFileOtherVersion(s3UserId, bucketId, key, versionId, fields) {
|
|
622
595
|
return __awaiter(this, void 0, void 0, function* () {
|
|
623
596
|
const mutation = (0, mutations_1.REMOVE_FILE_OTHER_VERSION)(fields);
|
|
624
597
|
const variables = {
|
|
625
598
|
s3UserId,
|
|
626
599
|
bucketId,
|
|
627
600
|
key,
|
|
628
|
-
versionId
|
|
629
|
-
serviceId
|
|
601
|
+
versionId
|
|
630
602
|
};
|
|
631
603
|
try {
|
|
632
604
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -638,13 +610,12 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
638
610
|
}
|
|
639
611
|
});
|
|
640
612
|
}
|
|
641
|
-
resetKey(s3UserId, updateBy,
|
|
613
|
+
resetKey(s3UserId, updateBy, fields) {
|
|
642
614
|
return __awaiter(this, void 0, void 0, function* () {
|
|
643
615
|
const mutation = (0, mutations_1.RESET_KEY)(fields);
|
|
644
616
|
const variables = {
|
|
645
617
|
s3UserId,
|
|
646
|
-
updateBy
|
|
647
|
-
serviceId
|
|
618
|
+
updateBy
|
|
648
619
|
};
|
|
649
620
|
try {
|
|
650
621
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -656,13 +627,12 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
656
627
|
}
|
|
657
628
|
});
|
|
658
629
|
}
|
|
659
|
-
actionSyncUserFromS3(s3UserId, updateBy,
|
|
630
|
+
actionSyncUserFromS3(s3UserId, updateBy, fields) {
|
|
660
631
|
return __awaiter(this, void 0, void 0, function* () {
|
|
661
632
|
const mutation = (0, mutations_1.ACTION_SYNC_USER_FROM_S3)(fields);
|
|
662
633
|
const variables = {
|
|
663
634
|
s3UserId,
|
|
664
|
-
updateBy
|
|
665
|
-
serviceId
|
|
635
|
+
updateBy
|
|
666
636
|
};
|
|
667
637
|
try {
|
|
668
638
|
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
@@ -674,14 +644,13 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
674
644
|
}
|
|
675
645
|
});
|
|
676
646
|
}
|
|
677
|
-
chartInYear(s3UserId, year, month,
|
|
647
|
+
chartInYear(s3UserId, year, month, fields) {
|
|
678
648
|
return __awaiter(this, void 0, void 0, function* () {
|
|
679
649
|
const query = (0, queries_1.CHART_IN_YEAR)(fields);
|
|
680
650
|
const variables = {
|
|
681
651
|
s3UserId,
|
|
682
652
|
year,
|
|
683
|
-
month
|
|
684
|
-
serviceId
|
|
653
|
+
month
|
|
685
654
|
};
|
|
686
655
|
try {
|
|
687
656
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -693,12 +662,11 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
693
662
|
}
|
|
694
663
|
});
|
|
695
664
|
}
|
|
696
|
-
getIPConsul(userId
|
|
665
|
+
getIPConsul(userId) {
|
|
697
666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
698
667
|
const query = queries_1.GET_IP_CONSUL;
|
|
699
668
|
const variables = {
|
|
700
|
-
userId
|
|
701
|
-
serviceId
|
|
669
|
+
userId
|
|
702
670
|
};
|
|
703
671
|
try {
|
|
704
672
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -710,7 +678,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
710
678
|
}
|
|
711
679
|
});
|
|
712
680
|
}
|
|
713
|
-
filterListObject(s3UserId, bucketId, maxKeys, key, prefixSearch, continuationToken,
|
|
681
|
+
filterListObject(s3UserId, bucketId, maxKeys, key, prefixSearch, continuationToken, fields) {
|
|
714
682
|
return __awaiter(this, void 0, void 0, function* () {
|
|
715
683
|
const query = (0, queries_1.FILTER_LIST_OBJECT)(fields);
|
|
716
684
|
const variables = {
|
|
@@ -719,8 +687,7 @@ class StorageS3Service extends serviceSDK_1.Service {
|
|
|
719
687
|
maxKeys,
|
|
720
688
|
key,
|
|
721
689
|
prefixSearch,
|
|
722
|
-
continuationToken
|
|
723
|
-
serviceId
|
|
690
|
+
continuationToken
|
|
724
691
|
};
|
|
725
692
|
try {
|
|
726
693
|
const response = yield this.graphqlQueryV2(query, variables);
|
|
@@ -9,10 +9,8 @@ export interface CreatePortNat {
|
|
|
9
9
|
export interface CreateSnapShot {
|
|
10
10
|
computingId: string;
|
|
11
11
|
snapshotName: string;
|
|
12
|
-
serviceId: string;
|
|
13
12
|
}
|
|
14
13
|
export interface RollBackSnapShot {
|
|
15
14
|
computingId: string;
|
|
16
15
|
snapshotId: string;
|
|
17
|
-
serviceId: string;
|
|
18
16
|
}
|