@todoist/automations-cli 2.1.3 → 2.2.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 CHANGED
@@ -8553,7 +8553,7 @@ import { fileURLToPath } from "node:url";
8553
8553
  // package.json
8554
8554
  var package_default = {
8555
8555
  name: "@todoist/automations-cli",
8556
- version: "2.1.3",
8556
+ version: "2.2.0",
8557
8557
  description: "Command-line client for Todoist Automations",
8558
8558
  type: "module",
8559
8559
  bin: {
@@ -29589,7 +29589,8 @@ var RequiredConnectorSchema = external_exports.object({
29589
29589
  connectorIconUrl: external_exports.string().nullable(),
29590
29590
  requiredTypes: external_exports.array(external_exports.enum(CONNECTION_TYPES)),
29591
29591
  requiresConnection: external_exports.boolean(),
29592
- isSystem: external_exports.boolean().optional()
29592
+ isSystem: external_exports.boolean().optional(),
29593
+ isPermanent: external_exports.boolean().optional()
29593
29594
  });
29594
29595
  var AutomationConnectionSchema = external_exports.object({
29595
29596
  connectorId: external_exports.string(),
@@ -29974,6 +29975,7 @@ var ReadUsageSummaryResponseSchema = external_exports.object({
29974
29975
 
29975
29976
  // ../../packages/sdk/dist/core/dist/esm/types/failure-category.types.js
29976
29977
  var FAILURE_CATEGORY_REGISTRY = {
29978
+ ai_quota_exceeded: { reliabilityLabel: "AI usage quota exceeded" },
29977
29979
  mcp_upstream_unavailable: { reliabilityLabel: "Mcp Upstream Unavailable" },
29978
29980
  mcp_client_missing: { reliabilityLabel: "Mcp Client Missing" },
29979
29981
  mcp_tool_missing: { reliabilityLabel: "Mcp Tool Missing" },
@@ -30621,6 +30623,7 @@ var ConnectorSchema = external_exports.object({
30621
30623
  capabilities: ConnectorCapabilitiesSchema,
30622
30624
  requiresConnection: external_exports.boolean(),
30623
30625
  isSystem: external_exports.boolean().optional(),
30626
+ isPermanent: external_exports.boolean().optional(),
30624
30627
  isManaged: external_exports.boolean().optional(),
30625
30628
  connectsViaCli: external_exports.boolean().optional(),
30626
30629
  mcpServerUrlInput: McpServerUrlInputSchema.optional()
@@ -31056,17 +31059,28 @@ var automationExecutionResultSchema = external_exports.discriminatedUnion("statu
31056
31059
 
31057
31060
  // ../../packages/sdk/dist/core/dist/esm/schemas/sample-automation.schema.js
31058
31061
  var sampleAutomationInstructionsSchema = external_exports.string().nullable();
31062
+ var sampleAutomationSharedBySchema = external_exports.object({
31063
+ name: external_exports.string().min(1).max(100),
31064
+ imageId: external_exports.string().nullable()
31065
+ });
31059
31066
  var sampleAutomationSchema = external_exports.object({
31060
31067
  id: external_exports.string(),
31061
31068
  manifest: manifestSchema,
31062
31069
  connectorDetails: external_exports.array(connectorDetailsSchema),
31063
31070
  isOneClickInstallEnabled: external_exports.boolean().default(false),
31064
- staffPick: external_exports.boolean().default(false)
31071
+ staffPick: external_exports.boolean().default(false),
31072
+ sharedBy: sampleAutomationSharedBySchema.nullable().optional()
31065
31073
  });
31066
31074
  var sampleAutomationsSchema = external_exports.array(sampleAutomationSchema);
31067
31075
  var sampleAutomationDetailSchema = sampleAutomationSchema.extend({ instructions: sampleAutomationInstructionsSchema });
31068
31076
  var SAMPLE_AUTOMATION_NOT_FOUND_CODE = "sample_automation_not_found";
31069
31077
 
31078
+ // ../../packages/sdk/dist/core/dist/esm/schemas/sample-automation-idea.schema.js
31079
+ var shareAutomationIdeaResponseSchema = external_exports.object({
31080
+ id: external_exports.string(),
31081
+ createdAt: external_exports.string().datetime()
31082
+ });
31083
+
31070
31084
  // ../../packages/sdk/dist/clients/automations/endpoints.js
31071
31085
  var root4 = "/automations";
31072
31086
  var automationsEndpoints = {
@@ -31075,6 +31089,7 @@ var automationsEndpoints = {
31075
31089
  metadata: (id) => `${root4}/${encodeURIComponent(id)}/metadata`,
31076
31090
  schedule: (id) => `${root4}/${encodeURIComponent(id)}/schedule`,
31077
31091
  duplicate: (id) => `${root4}/${encodeURIComponent(id)}/duplicate`,
31092
+ shareIdea: (id) => `${root4}/${encodeURIComponent(id)}/share-idea`,
31078
31093
  draft: (id) => `${root4}/${encodeURIComponent(id)}/draft`,
31079
31094
  trigger: (id) => `${root4}/${encodeURIComponent(id)}/trigger`,
31080
31095
  test: (id) => `${root4}/${encodeURIComponent(id)}/test`,
@@ -31166,6 +31181,15 @@ var AutomationsClient = class extends BaseClient {
31166
31181
  });
31167
31182
  return automationDraftWithValidationSchema.parse(data);
31168
31183
  }
31184
+ async shareIdea(id, options) {
31185
+ const parsedId = IdSchema.parse(id);
31186
+ const data = await this.request({
31187
+ method: "POST",
31188
+ path: automationsEndpoints.shareIdea(parsedId),
31189
+ options
31190
+ });
31191
+ return shareAutomationIdeaResponseSchema.parse(data);
31192
+ }
31169
31193
  async createDraft(id, options) {
31170
31194
  const parsedId = IdSchema.parse(id);
31171
31195
  const data = await this.request({
@@ -31665,6 +31689,7 @@ var workspaceAutomationsEndpoints = {
31665
31689
  trigger: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/trigger`,
31666
31690
  draft: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/draft`,
31667
31691
  duplicate: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/duplicate`,
31692
+ shareIdea: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/share-idea`,
31668
31693
  sampleInstall: (workspaceId, sampleAutomationId) => `${sample2(workspaceId, sampleAutomationId)}/install`,
31669
31694
  sampleDraft: (workspaceId, sampleAutomationId) => `${sample2(workspaceId, sampleAutomationId)}/draft`
31670
31695
  };
@@ -31774,6 +31799,14 @@ var WorkspaceAutomationsClient = class extends BaseClient {
31774
31799
  });
31775
31800
  return automationDraftWithValidationSchema.parse(data);
31776
31801
  }
31802
+ async shareIdea(workspaceId, id, options) {
31803
+ const data = await this.request({
31804
+ method: "POST",
31805
+ path: workspaceAutomationsEndpoints.shareIdea(IdSchema.parse(workspaceId), IdSchema.parse(id)),
31806
+ options
31807
+ });
31808
+ return shareAutomationIdeaResponseSchema.parse(data);
31809
+ }
31777
31810
  async createDraft(workspaceId, id, options) {
31778
31811
  const data = await this.request({
31779
31812
  method: "POST",
@@ -31969,7 +32002,8 @@ var connectionsEndpoints = {
31969
32002
  dependentAutomations: (connectorId) => `${root11}/${encodeURIComponent(connectorId)}/automations`,
31970
32003
  create: (connectorId, capability) => `${root11}/${encodeURIComponent(connectorId)}/${encodeURIComponent(capability)}`,
31971
32004
  localOAuth: (connectorId, capability) => `${root11}/${encodeURIComponent(connectorId)}/${encodeURIComponent(capability)}/local-oauth`,
31972
- checkManifest: `${root11}/check-manifest`
32005
+ checkManifest: `${root11}/check-manifest`,
32006
+ ensurePermanent: `${root11}/ensure-permanent`
31973
32007
  };
31974
32008
 
31975
32009
  // ../../packages/sdk/dist/clients/connections/connections-client.js
@@ -32079,6 +32113,13 @@ var ConnectionsClient = class extends BaseClient {
32079
32113
  });
32080
32114
  return ManifestConnectionCheckResultSchema.parse(data);
32081
32115
  }
32116
+ async ensurePermanent(options) {
32117
+ await this.request({
32118
+ method: "POST",
32119
+ path: connectionsEndpoints.ensurePermanent,
32120
+ options
32121
+ });
32122
+ }
32082
32123
  };
32083
32124
 
32084
32125
  // ../../packages/sdk/dist/clients/connectors/endpoints.js
@@ -35530,6 +35571,7 @@ var ReadUsageSummaryResponseSchema2 = external_exports.object({
35530
35571
 
35531
35572
  // ../../packages/core/dist/esm/types/failure-category.types.js
35532
35573
  var FAILURE_CATEGORY_REGISTRY2 = {
35574
+ ai_quota_exceeded: { reliabilityLabel: "AI usage quota exceeded" },
35533
35575
  mcp_upstream_unavailable: { reliabilityLabel: "Mcp Upstream Unavailable" },
35534
35576
  mcp_client_missing: { reliabilityLabel: "Mcp Client Missing" },
35535
35577
  mcp_tool_missing: { reliabilityLabel: "Mcp Tool Missing" },
@@ -36664,6 +36706,12 @@ var ConnectorSchema2 = external_exports.object({
36664
36706
  * independent from whether a third-party connector requires account setup.
36665
36707
  */
36666
36708
  isSystem: external_exports.boolean().optional(),
36709
+ /**
36710
+ * Whether the connector is always connected to the signed-in user's own
36711
+ * account, with one connection per capability that can't be removed.
36712
+ * Unlike `isSystem`, it still runs on a connection.
36713
+ */
36714
+ isPermanent: external_exports.boolean().optional(),
36667
36715
  /**
36668
36716
  * Managed connectors (e.g. WhatsApp) share a single linked identity across
36669
36717
  * connection types — one onboarding covers both action and trigger uses.