ugcinc 1.6.0 → 1.8.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 +12 -0
- package/dist/tasks.d.ts +9 -0
- package/dist/tasks.js +6 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ For complete API documentation, including all endpoints, parameters, and example
|
|
|
60
60
|
- Get scheduled tasks
|
|
61
61
|
- View task history
|
|
62
62
|
- Retry tasks
|
|
63
|
+
- Delete tasks
|
|
63
64
|
|
|
64
65
|
### Statistics
|
|
65
66
|
- Get account statistics
|
|
@@ -190,6 +191,17 @@ if (response.ok) {
|
|
|
190
191
|
}
|
|
191
192
|
```
|
|
192
193
|
|
|
194
|
+
**Delete tasks:**
|
|
195
|
+
```typescript
|
|
196
|
+
const response = await client.tasks.deleteTasks({
|
|
197
|
+
taskIds: ['task-uuid-1', 'task-uuid-2']
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
if (response.ok) {
|
|
201
|
+
console.log(`Deleted ${response.data.deleted} task(s)`);
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
193
205
|
## TypeScript Support
|
|
194
206
|
|
|
195
207
|
This package is written in TypeScript and provides full type definitions:
|
package/dist/tasks.d.ts
CHANGED
|
@@ -17,4 +17,13 @@ export declare class TasksClient extends BaseClient {
|
|
|
17
17
|
retried: number;
|
|
18
18
|
ids: string[];
|
|
19
19
|
}>>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete tasks
|
|
22
|
+
*/
|
|
23
|
+
deleteTasks(params: {
|
|
24
|
+
taskIds: string[];
|
|
25
|
+
}): Promise<ApiResponse<{
|
|
26
|
+
deleted: number;
|
|
27
|
+
ids: string[];
|
|
28
|
+
}>>;
|
|
20
29
|
}
|
package/dist/tasks.js
CHANGED
|
@@ -18,5 +18,11 @@ class TasksClient extends base_1.BaseClient {
|
|
|
18
18
|
async retryTasks(params) {
|
|
19
19
|
return this.post('/tasks/retry', params);
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Delete tasks
|
|
23
|
+
*/
|
|
24
|
+
async deleteTasks(params) {
|
|
25
|
+
return this.post('/tasks/delete', params);
|
|
26
|
+
}
|
|
21
27
|
}
|
|
22
28
|
exports.TasksClient = TasksClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "TypeScript/JavaScript client for the UGC Inc API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript": "^5.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"ugcinc": "^1.
|
|
28
|
+
"ugcinc": "^1.7.0"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|