@doist/automations-cli 1.23.0 → 1.25.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 +52 -41
- 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.25.0",
|
|
6903
6903
|
description: "Command-line client for Todoist Automations",
|
|
6904
6904
|
type: "module",
|
|
6905
6905
|
bin: {
|
|
@@ -7082,7 +7082,9 @@ var AUTOMATION_RUN_STATUSES = [
|
|
|
7082
7082
|
// ../../packages/core/dist/esm/constants/usage-billing.constants.js
|
|
7083
7083
|
var USAGE_BILLING_DENIAL_CODES = [
|
|
7084
7084
|
"usage_billing_insufficient_credit",
|
|
7085
|
-
"usage_billing_no_billing_account"
|
|
7085
|
+
"usage_billing_no_billing_account",
|
|
7086
|
+
"usage_billing_plan_required",
|
|
7087
|
+
"usage_billing_billing_paused"
|
|
7086
7088
|
];
|
|
7087
7089
|
var USAGE_BILLING_TEMPORARILY_UNAVAILABLE_CODE = "usage_billing_temporarily_unavailable";
|
|
7088
7090
|
var USAGE_BILLING_UNAVAILABLE_CODE = "usage_billing_unavailable";
|
|
@@ -7127,93 +7129,78 @@ var PROVIDER_TYPES = ["direct", "pubsub", "app-level"];
|
|
|
7127
7129
|
// ../../packages/core/dist/esm/models.js
|
|
7128
7130
|
var MODEL_CATALOG = {
|
|
7129
7131
|
"gemini-2.5-flash-lite": {
|
|
7130
|
-
|
|
7132
|
+
vendor: "google",
|
|
7131
7133
|
family: "2.5",
|
|
7132
|
-
providerModelId: "gemini-2.5-flash-lite",
|
|
7133
7134
|
manifestSelectable: true
|
|
7134
7135
|
},
|
|
7135
7136
|
"gemini-2.5-flash": {
|
|
7136
|
-
|
|
7137
|
+
vendor: "google",
|
|
7137
7138
|
family: "2.5",
|
|
7138
|
-
providerModelId: "gemini-2.5-flash",
|
|
7139
7139
|
manifestSelectable: true
|
|
7140
7140
|
},
|
|
7141
7141
|
"gemini-3.1-pro": {
|
|
7142
|
-
|
|
7142
|
+
vendor: "google",
|
|
7143
7143
|
family: "3",
|
|
7144
|
-
providerModelId: "gemini-3.1-pro-preview",
|
|
7145
7144
|
manifestSelectable: true
|
|
7146
7145
|
},
|
|
7147
7146
|
"gemini-3.8-flash": {
|
|
7148
|
-
|
|
7147
|
+
vendor: "google",
|
|
7149
7148
|
family: "3",
|
|
7150
|
-
providerModelId: "gemini-3.8-flash",
|
|
7151
7149
|
manifestSelectable: true
|
|
7152
7150
|
},
|
|
7153
7151
|
"claude-opus-4-6": {
|
|
7154
|
-
|
|
7152
|
+
vendor: "anthropic",
|
|
7155
7153
|
family: "4.6",
|
|
7156
|
-
providerModelId: "claude-opus-4-6",
|
|
7157
7154
|
manifestSelectable: true
|
|
7158
7155
|
},
|
|
7159
7156
|
"claude-sonnet-5": {
|
|
7160
|
-
|
|
7157
|
+
vendor: "anthropic",
|
|
7161
7158
|
family: "5",
|
|
7162
|
-
providerModelId: "claude-sonnet-5",
|
|
7163
7159
|
manifestSelectable: true
|
|
7164
7160
|
},
|
|
7165
7161
|
"claude-sonnet-5-5": {
|
|
7166
|
-
|
|
7162
|
+
vendor: "anthropic",
|
|
7167
7163
|
family: "5",
|
|
7168
|
-
providerModelId: "claude-sonnet-5-5",
|
|
7169
7164
|
manifestSelectable: false
|
|
7170
7165
|
},
|
|
7171
7166
|
"claude-haiku-5-5": {
|
|
7172
|
-
|
|
7167
|
+
vendor: "anthropic",
|
|
7173
7168
|
family: "5",
|
|
7174
|
-
providerModelId: "claude-haiku-5-5",
|
|
7175
7169
|
manifestSelectable: false
|
|
7176
7170
|
},
|
|
7177
7171
|
"claude-sonnet-4-6": {
|
|
7178
|
-
|
|
7172
|
+
vendor: "anthropic",
|
|
7179
7173
|
family: "4.6",
|
|
7180
|
-
providerModelId: "claude-sonnet-4-6",
|
|
7181
7174
|
manifestSelectable: true
|
|
7182
7175
|
},
|
|
7183
7176
|
"claude-haiku-4-5": {
|
|
7184
|
-
|
|
7177
|
+
vendor: "anthropic",
|
|
7185
7178
|
family: "4.5",
|
|
7186
|
-
providerModelId: "claude-haiku-4-5",
|
|
7187
7179
|
manifestSelectable: true
|
|
7188
7180
|
},
|
|
7189
7181
|
"deepseek-v4-flash": {
|
|
7190
|
-
|
|
7182
|
+
vendor: "deepseek",
|
|
7191
7183
|
family: "deepseek",
|
|
7192
|
-
providerModelId: "deepseek/deepseek-v4-flash-0731",
|
|
7193
7184
|
manifestSelectable: true
|
|
7194
7185
|
},
|
|
7195
7186
|
"deepseek-v4-pro": {
|
|
7196
|
-
|
|
7187
|
+
vendor: "deepseek",
|
|
7197
7188
|
family: "deepseek",
|
|
7198
|
-
providerModelId: "deepseek/deepseek-v4-pro",
|
|
7199
7189
|
manifestSelectable: true
|
|
7200
7190
|
},
|
|
7201
7191
|
"mimo-v2.5": {
|
|
7202
|
-
|
|
7192
|
+
vendor: "mimo",
|
|
7203
7193
|
family: "mimo",
|
|
7204
|
-
providerModelId: "xiaomi/mimo-v2.5",
|
|
7205
7194
|
manifestSelectable: true
|
|
7206
7195
|
},
|
|
7207
7196
|
"mimo-v2.5-pro": {
|
|
7208
|
-
|
|
7197
|
+
vendor: "mimo",
|
|
7209
7198
|
family: "mimo",
|
|
7210
|
-
providerModelId: "xiaomi/mimo-v2.5-pro",
|
|
7211
7199
|
manifestSelectable: true
|
|
7212
7200
|
},
|
|
7213
7201
|
"glm-5.2": {
|
|
7214
|
-
|
|
7202
|
+
vendor: "glm",
|
|
7215
7203
|
family: "glm",
|
|
7216
|
-
providerModelId: "z-ai/glm-5.2",
|
|
7217
7204
|
manifestSelectable: true
|
|
7218
7205
|
}
|
|
7219
7206
|
};
|
|
@@ -7222,8 +7209,8 @@ var SUPPORTED_SEARCH_MODELS = SUPPORTED_LLM_MODELS.filter(supportsWebSearch);
|
|
|
7222
7209
|
var MANIFEST_LLM_MODELS = SUPPORTED_LLM_MODELS.filter((modelId) => MODEL_CATALOG[modelId].manifestSelectable);
|
|
7223
7210
|
var MANIFEST_SEARCH_MODELS = MANIFEST_LLM_MODELS.filter((modelId) => supportsWebSearch(modelId));
|
|
7224
7211
|
function supportsWebSearch(modelId) {
|
|
7225
|
-
const {
|
|
7226
|
-
return
|
|
7212
|
+
const { vendor } = MODEL_CATALOG[modelId];
|
|
7213
|
+
return vendor === "google" || vendor === "anthropic";
|
|
7227
7214
|
}
|
|
7228
7215
|
|
|
7229
7216
|
// ../../node_modules/zod/v4/classic/external.js
|
|
@@ -26970,6 +26957,8 @@ var admitUsersResponseSchema = external_exports.object({
|
|
|
26970
26957
|
welcomeCredit: external_exports.object({
|
|
26971
26958
|
granted: external_exports.number().int().nonnegative(),
|
|
26972
26959
|
alreadyGranted: external_exports.number().int().nonnegative(),
|
|
26960
|
+
/** Users with no Stripe customer yet, who will get the credit when they first top-up. */
|
|
26961
|
+
pending: external_exports.number().int().nonnegative().default(0),
|
|
26973
26962
|
/** Users who got no credit, with the reason to show the admin. */
|
|
26974
26963
|
notGranted: external_exports.array(external_exports.object({ userId: external_exports.string(), reason: external_exports.string() }))
|
|
26975
26964
|
})
|
|
@@ -26979,7 +26968,9 @@ var admitUsersResponseSchema = external_exports.object({
|
|
|
26979
26968
|
var UsageBillingProductSchema = external_exports.literal("automations");
|
|
26980
26969
|
var USAGE_BILLING_BLOCK_REASONS = [
|
|
26981
26970
|
"insufficient_credit",
|
|
26982
|
-
"temporarily_unavailable"
|
|
26971
|
+
"temporarily_unavailable",
|
|
26972
|
+
"plan_required",
|
|
26973
|
+
"billing_paused"
|
|
26983
26974
|
];
|
|
26984
26975
|
var USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS = [
|
|
26985
26976
|
...USAGE_BILLING_BLOCK_REASONS,
|
|
@@ -26987,6 +26978,7 @@ var USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS = [
|
|
|
26987
26978
|
];
|
|
26988
26979
|
var UsageBillingAuthorizationDenialReasonSchema = external_exports.enum(USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS);
|
|
26989
26980
|
var UsageBillingBlockReasonSchema = external_exports.enum(USAGE_BILLING_BLOCK_REASONS);
|
|
26981
|
+
var UsageBillingReasonFromTodoistSchema = external_exports.string().min(1);
|
|
26990
26982
|
var UsageBillingAccountSchema = external_exports.object({
|
|
26991
26983
|
id: external_exports.string().regex(/^[1-9]\d*$/),
|
|
26992
26984
|
type: external_exports.literal("user")
|
|
@@ -27011,7 +27003,7 @@ var AuthorizeUsageResponseSchema = external_exports.discriminatedUnion("decision
|
|
|
27011
27003
|
}),
|
|
27012
27004
|
external_exports.object({
|
|
27013
27005
|
decision: external_exports.literal("denied"),
|
|
27014
|
-
reason:
|
|
27006
|
+
reason: UsageBillingReasonFromTodoistSchema,
|
|
27015
27007
|
available_units: UsageBillingBalanceSchema
|
|
27016
27008
|
})
|
|
27017
27009
|
]);
|
|
@@ -27065,7 +27057,7 @@ var ReadStateResponseSchema = external_exports.object({
|
|
|
27065
27057
|
settled_units: UsageBillingBalanceSchema.optional(),
|
|
27066
27058
|
settled_amount: UsageBillingBalanceSchema.optional(),
|
|
27067
27059
|
is_settled_low_balance: external_exports.boolean().optional(),
|
|
27068
|
-
usage_block_reason:
|
|
27060
|
+
usage_block_reason: UsageBillingReasonFromTodoistSchema.nullable().optional()
|
|
27069
27061
|
});
|
|
27070
27062
|
var UsageBillingAmountSchema = UsageBillingUnitsSchema.nullable();
|
|
27071
27063
|
var UsageBillingEntrySchema = external_exports.object({
|
|
@@ -27123,10 +27115,25 @@ var GrantWelcomeCreditRequestSchema = external_exports.object({
|
|
|
27123
27115
|
account: UsageBillingAccountSchema,
|
|
27124
27116
|
operator: external_exports.email().max(254)
|
|
27125
27117
|
});
|
|
27126
|
-
var
|
|
27127
|
-
|
|
27128
|
-
|
|
27129
|
-
|
|
27118
|
+
var GRANTED_WELCOME_CREDIT_STATUSES = ["granted", "already_granted"];
|
|
27119
|
+
var PENDING_WELCOME_CREDIT_STATUS = "pending";
|
|
27120
|
+
var WELCOME_CREDIT_STATUSES = [
|
|
27121
|
+
...GRANTED_WELCOME_CREDIT_STATUSES,
|
|
27122
|
+
PENDING_WELCOME_CREDIT_STATUS
|
|
27123
|
+
];
|
|
27124
|
+
function isKnownWelcomeCreditStatus(status) {
|
|
27125
|
+
return WELCOME_CREDIT_STATUSES.includes(status);
|
|
27126
|
+
}
|
|
27127
|
+
var GrantWelcomeCreditResponseSchema = external_exports.union([
|
|
27128
|
+
external_exports.object({
|
|
27129
|
+
status: external_exports.enum(GRANTED_WELCOME_CREDIT_STATUSES),
|
|
27130
|
+
grant_id: external_exports.string().min(1)
|
|
27131
|
+
}),
|
|
27132
|
+
external_exports.object({ status: external_exports.literal(PENDING_WELCOME_CREDIT_STATUS) }),
|
|
27133
|
+
external_exports.object({
|
|
27134
|
+
status: external_exports.string().min(1).refine((status) => !isKnownWelcomeCreditStatus(status))
|
|
27135
|
+
})
|
|
27136
|
+
]);
|
|
27130
27137
|
|
|
27131
27138
|
// ../../packages/core/dist/esm/types/failure-category.types.js
|
|
27132
27139
|
var FAILURE_CATEGORIES = [
|
|
@@ -32429,6 +32436,10 @@ var UsageBillingTopUpUnavailableResponseSchema = external_exports.object({
|
|
|
32429
32436
|
http_code: external_exports.literal(400),
|
|
32430
32437
|
error_extra: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
32431
32438
|
});
|
|
32439
|
+
var UsageBillingTopUpRefusalSchema = external_exports.object({
|
|
32440
|
+
error_tag: external_exports.string().min(1),
|
|
32441
|
+
error_extra: external_exports.object({ event_id: external_exports.string().optional() }).optional()
|
|
32442
|
+
});
|
|
32432
32443
|
var UsageBillingClient = class extends BaseClient {
|
|
32433
32444
|
async readState(options) {
|
|
32434
32445
|
const data = await this.request({
|