@doist/automations-cli 1.23.0 → 1.24.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 +31 -9
- 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.24.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";
|
|
@@ -26970,6 +26972,8 @@ var admitUsersResponseSchema = external_exports.object({
|
|
|
26970
26972
|
welcomeCredit: external_exports.object({
|
|
26971
26973
|
granted: external_exports.number().int().nonnegative(),
|
|
26972
26974
|
alreadyGranted: external_exports.number().int().nonnegative(),
|
|
26975
|
+
/** Users with no Stripe customer yet, who will get the credit when they first top-up. */
|
|
26976
|
+
pending: external_exports.number().int().nonnegative().default(0),
|
|
26973
26977
|
/** Users who got no credit, with the reason to show the admin. */
|
|
26974
26978
|
notGranted: external_exports.array(external_exports.object({ userId: external_exports.string(), reason: external_exports.string() }))
|
|
26975
26979
|
})
|
|
@@ -26979,7 +26983,9 @@ var admitUsersResponseSchema = external_exports.object({
|
|
|
26979
26983
|
var UsageBillingProductSchema = external_exports.literal("automations");
|
|
26980
26984
|
var USAGE_BILLING_BLOCK_REASONS = [
|
|
26981
26985
|
"insufficient_credit",
|
|
26982
|
-
"temporarily_unavailable"
|
|
26986
|
+
"temporarily_unavailable",
|
|
26987
|
+
"plan_required",
|
|
26988
|
+
"billing_paused"
|
|
26983
26989
|
];
|
|
26984
26990
|
var USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS = [
|
|
26985
26991
|
...USAGE_BILLING_BLOCK_REASONS,
|
|
@@ -26987,6 +26993,7 @@ var USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS = [
|
|
|
26987
26993
|
];
|
|
26988
26994
|
var UsageBillingAuthorizationDenialReasonSchema = external_exports.enum(USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS);
|
|
26989
26995
|
var UsageBillingBlockReasonSchema = external_exports.enum(USAGE_BILLING_BLOCK_REASONS);
|
|
26996
|
+
var UsageBillingReasonFromTodoistSchema = external_exports.string().min(1);
|
|
26990
26997
|
var UsageBillingAccountSchema = external_exports.object({
|
|
26991
26998
|
id: external_exports.string().regex(/^[1-9]\d*$/),
|
|
26992
26999
|
type: external_exports.literal("user")
|
|
@@ -27011,7 +27018,7 @@ var AuthorizeUsageResponseSchema = external_exports.discriminatedUnion("decision
|
|
|
27011
27018
|
}),
|
|
27012
27019
|
external_exports.object({
|
|
27013
27020
|
decision: external_exports.literal("denied"),
|
|
27014
|
-
reason:
|
|
27021
|
+
reason: UsageBillingReasonFromTodoistSchema,
|
|
27015
27022
|
available_units: UsageBillingBalanceSchema
|
|
27016
27023
|
})
|
|
27017
27024
|
]);
|
|
@@ -27065,7 +27072,7 @@ var ReadStateResponseSchema = external_exports.object({
|
|
|
27065
27072
|
settled_units: UsageBillingBalanceSchema.optional(),
|
|
27066
27073
|
settled_amount: UsageBillingBalanceSchema.optional(),
|
|
27067
27074
|
is_settled_low_balance: external_exports.boolean().optional(),
|
|
27068
|
-
usage_block_reason:
|
|
27075
|
+
usage_block_reason: UsageBillingReasonFromTodoistSchema.nullable().optional()
|
|
27069
27076
|
});
|
|
27070
27077
|
var UsageBillingAmountSchema = UsageBillingUnitsSchema.nullable();
|
|
27071
27078
|
var UsageBillingEntrySchema = external_exports.object({
|
|
@@ -27123,10 +27130,25 @@ var GrantWelcomeCreditRequestSchema = external_exports.object({
|
|
|
27123
27130
|
account: UsageBillingAccountSchema,
|
|
27124
27131
|
operator: external_exports.email().max(254)
|
|
27125
27132
|
});
|
|
27126
|
-
var
|
|
27127
|
-
|
|
27128
|
-
|
|
27129
|
-
|
|
27133
|
+
var GRANTED_WELCOME_CREDIT_STATUSES = ["granted", "already_granted"];
|
|
27134
|
+
var PENDING_WELCOME_CREDIT_STATUS = "pending";
|
|
27135
|
+
var WELCOME_CREDIT_STATUSES = [
|
|
27136
|
+
...GRANTED_WELCOME_CREDIT_STATUSES,
|
|
27137
|
+
PENDING_WELCOME_CREDIT_STATUS
|
|
27138
|
+
];
|
|
27139
|
+
function isKnownWelcomeCreditStatus(status) {
|
|
27140
|
+
return WELCOME_CREDIT_STATUSES.includes(status);
|
|
27141
|
+
}
|
|
27142
|
+
var GrantWelcomeCreditResponseSchema = external_exports.union([
|
|
27143
|
+
external_exports.object({
|
|
27144
|
+
status: external_exports.enum(GRANTED_WELCOME_CREDIT_STATUSES),
|
|
27145
|
+
grant_id: external_exports.string().min(1)
|
|
27146
|
+
}),
|
|
27147
|
+
external_exports.object({ status: external_exports.literal(PENDING_WELCOME_CREDIT_STATUS) }),
|
|
27148
|
+
external_exports.object({
|
|
27149
|
+
status: external_exports.string().min(1).refine((status) => !isKnownWelcomeCreditStatus(status))
|
|
27150
|
+
})
|
|
27151
|
+
]);
|
|
27130
27152
|
|
|
27131
27153
|
// ../../packages/core/dist/esm/types/failure-category.types.js
|
|
27132
27154
|
var FAILURE_CATEGORIES = [
|