@doist/automations-cli 1.22.3 → 1.23.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/dist/index.js +16 -6
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6899,7 +6899,7 @@ import { fileURLToPath } from "node:url";
|
|
|
6899
6899
|
// package.json
|
|
6900
6900
|
var package_default = {
|
|
6901
6901
|
name: "@doist/automations-cli",
|
|
6902
|
-
version: "1.
|
|
6902
|
+
version: "1.23.0",
|
|
6903
6903
|
description: "Command-line client for Todoist Automations",
|
|
6904
6904
|
type: "module",
|
|
6905
6905
|
bin: {
|
|
@@ -27229,7 +27229,7 @@ var AutomationRunDtoSchema = external_exports.discriminatedUnion("status", [
|
|
|
27229
27229
|
...automationRunDtoBaseShape,
|
|
27230
27230
|
status: external_exports.literal("skipped"),
|
|
27231
27231
|
skipReason: external_exports.string().nullish(),
|
|
27232
|
-
skipCategory: external_exports.enum(SKIP_CATEGORIES).nullish()
|
|
27232
|
+
skipCategory: external_exports.enum(SKIP_CATEGORIES).nullish().catch(null)
|
|
27233
27233
|
})
|
|
27234
27234
|
]);
|
|
27235
27235
|
var automationRunListResponseSchema = external_exports.object({
|
|
@@ -27331,7 +27331,7 @@ var AutomationRunDetailDtoSchema = external_exports.discriminatedUnion("status",
|
|
|
27331
27331
|
...automationRunDetailDtoBaseShape,
|
|
27332
27332
|
status: external_exports.literal("skipped"),
|
|
27333
27333
|
skipReason: external_exports.string().nullish(),
|
|
27334
|
-
skipCategory: external_exports.enum(SKIP_CATEGORIES).nullish()
|
|
27334
|
+
skipCategory: external_exports.enum(SKIP_CATEGORIES).nullish().catch(null)
|
|
27335
27335
|
})
|
|
27336
27336
|
]);
|
|
27337
27337
|
function summarizeToolCallArgumentKeys(args) {
|
|
@@ -29156,7 +29156,7 @@ var runStatusSchema = external_exports.discriminatedUnion("status", [
|
|
|
29156
29156
|
status: external_exports.literal("skipped"),
|
|
29157
29157
|
lastRun: external_exports.iso.datetime(),
|
|
29158
29158
|
skipReason: external_exports.string().optional(),
|
|
29159
|
-
skipCategory: external_exports.enum(SKIP_CATEGORIES).optional()
|
|
29159
|
+
skipCategory: external_exports.enum(SKIP_CATEGORIES).optional().catch(void 0)
|
|
29160
29160
|
})
|
|
29161
29161
|
]);
|
|
29162
29162
|
var automationSchema = external_exports.object({
|
|
@@ -30079,7 +30079,7 @@ var DraftTestRunDetailDtoSchema = external_exports.discriminatedUnion("status",
|
|
|
30079
30079
|
...draftTestRunDetailDtoBaseShape,
|
|
30080
30080
|
status: external_exports.literal("skipped"),
|
|
30081
30081
|
skipReason: external_exports.string().nullish(),
|
|
30082
|
-
skipCategory: external_exports.enum(SKIP_CATEGORIES).nullish()
|
|
30082
|
+
skipCategory: external_exports.enum(SKIP_CATEGORIES).nullish().catch(null)
|
|
30083
30083
|
})
|
|
30084
30084
|
]);
|
|
30085
30085
|
|
|
@@ -31770,7 +31770,8 @@ var workspaceAutomationsEndpoints = {
|
|
|
31770
31770
|
visibility: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/visibility`,
|
|
31771
31771
|
move: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/move`,
|
|
31772
31772
|
trigger: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/trigger`,
|
|
31773
|
-
draft: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/draft
|
|
31773
|
+
draft: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/draft`,
|
|
31774
|
+
duplicate: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/duplicate`
|
|
31774
31775
|
};
|
|
31775
31776
|
function root8(workspaceId) {
|
|
31776
31777
|
return `/workspaces/${encodeURIComponent(workspaceId)}/automations`;
|
|
@@ -31883,6 +31884,15 @@ var WorkspaceAutomationsClient = class extends BaseClient {
|
|
|
31883
31884
|
* Opens an edit draft seeded from the published manifest. Answers 409 when
|
|
31884
31885
|
* one is already open; see `getOpenDraftConflictError`.
|
|
31885
31886
|
*/
|
|
31887
|
+
/** A draft copy of the automation, in the same workspace, for the caller to edit. */
|
|
31888
|
+
async duplicate(workspaceId, id, options) {
|
|
31889
|
+
const data = await this.request({
|
|
31890
|
+
method: "POST",
|
|
31891
|
+
path: workspaceAutomationsEndpoints.duplicate(IdSchema.parse(workspaceId), IdSchema.parse(id)),
|
|
31892
|
+
options
|
|
31893
|
+
});
|
|
31894
|
+
return automationDraftWithValidationSchema.parse(data);
|
|
31895
|
+
}
|
|
31886
31896
|
async createDraft(workspaceId, id, options) {
|
|
31887
31897
|
const data = await this.request({
|
|
31888
31898
|
method: "POST",
|