@composio/core 0.1.36-next.7 → 0.1.36-next.8

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.cjs CHANGED
@@ -275,7 +275,8 @@ var ToolListParamsSchema = import_zod.z.object({
275
275
  scopes: import_zod.z.array(import_zod.z.string()).optional(),
276
276
  tags: import_zod.z.array(import_zod.z.string()).optional(),
277
277
  limit: import_zod.z.number().optional(),
278
- search: import_zod.z.string().optional()
278
+ search: import_zod.z.string().optional(),
279
+ authConfigIds: import_zod.z.array(import_zod.z.string()).optional()
279
280
  });
280
281
  var CustomAuthParamsSchema = import_zod.z.object({
281
282
  baseURL: import_zod.z.string().optional(),
@@ -1705,7 +1706,7 @@ var ConnectedAccountRetrieveResponseSchema = import_zod6.z.object({
1705
1706
  });
1706
1707
  var ConnectedAccountListParamsSchema = import_zod6.z.object({
1707
1708
  authConfigIds: import_zod6.z.array(import_zod6.z.string()).nullable().optional().describe("The auth config ids of the connected accounts"),
1708
- cursor: import_zod6.z.string().nullish().describe("The cursor to paginate through the connected accounts"),
1709
+ cursor: import_zod6.z.number().nullable().optional().describe("The cursor to paginate through the connected accounts"),
1709
1710
  labels: import_zod6.z.array(import_zod6.z.string()).nullable().optional().describe("The labels of the connected accounts"),
1710
1711
  limit: import_zod6.z.number().nullable().optional().describe("The limit of the connected accounts to return"),
1711
1712
  orderBy: import_zod6.z.enum(["created_at", "updated_at"]).optional().describe("The order by of the connected accounts"),
@@ -1715,7 +1716,7 @@ var ConnectedAccountListParamsSchema = import_zod6.z.object({
1715
1716
  });
1716
1717
  var ConnectedAccountListResponseSchema = import_zod6.z.object({
1717
1718
  items: import_zod6.z.array(ConnectedAccountRetrieveResponseSchema).describe("The list of connected accounts"),
1718
- nextCursor: import_zod6.z.string().nullish().describe("The next cursor to paginate through the connected accounts"),
1719
+ nextCursor: import_zod6.z.string().nullable().describe("The next cursor to paginate through the connected accounts"),
1719
1720
  totalPages: import_zod6.z.number().describe("The total number of pages of connected accounts")
1720
1721
  });
1721
1722
 
@@ -2609,9 +2610,9 @@ var Tools = class {
2609
2610
  cause: queryParams.error
2610
2611
  });
2611
2612
  }
2612
- if (!("tools" in queryParams.data || "toolkits" in queryParams.data || "search" in queryParams.data)) {
2613
+ if (!("tools" in queryParams.data || "toolkits" in queryParams.data || "search" in queryParams.data || "authConfigIds" in queryParams.data)) {
2613
2614
  throw new ValidationError(
2614
- "Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search"
2615
+ "Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search, authConfigIds"
2615
2616
  );
2616
2617
  }
2617
2618
  let limit = "limit" in queryParams.data ? queryParams.data.limit : void 0;
@@ -2624,7 +2625,8 @@ var Tools = class {
2624
2625
  ...limit ? { limit } : {},
2625
2626
  ..."tags" in queryParams.data ? { tags: queryParams.data.tags } : {},
2626
2627
  ..."scopes" in queryParams.data ? { scopes: queryParams.data.scopes } : {},
2627
- ..."search" in queryParams.data ? { search: queryParams.data.search } : {}
2628
+ ..."search" in queryParams.data ? { search: queryParams.data.search } : {},
2629
+ ..."authConfigIds" in queryParams.data ? { auth_config_ids: queryParams.data.authConfigIds } : {}
2628
2630
  };
2629
2631
  logger_default.debug(`Fetching tools with filters: ${JSON.stringify(filters, null, 2)}`);
2630
2632
  const tools = await this.client.tools.list(filters);
@@ -3131,7 +3133,7 @@ var AuthConfigs = class {
3131
3133
  * @private
3132
3134
  */
3133
3135
  parseAuthConfigRetrieveResponse(authConfig) {
3134
- const responseToParse = {
3136
+ const result = AuthConfigRetrieveResponseSchema.safeParse({
3135
3137
  id: authConfig.id,
3136
3138
  name: authConfig.name,
3137
3139
  noOfConnections: authConfig.no_of_connections,
@@ -3149,13 +3151,11 @@ var AuthConfigs = class {
3149
3151
  createdAt: authConfig.created_at,
3150
3152
  lastUpdatedAt: authConfig.last_updated_at,
3151
3153
  restrictToFollowingTools: authConfig.restrict_to_following_tools
3152
- };
3153
- const result = AuthConfigRetrieveResponseSchema.safeParse(responseToParse);
3154
+ });
3154
3155
  if (result.error) {
3155
- logger_default.error("Failed to parse auth config response", {
3156
+ throw new ValidationError("Failed to parse auth config response", {
3156
3157
  cause: result.error
3157
3158
  });
3158
- return responseToParse;
3159
3159
  }
3160
3160
  return result.data;
3161
3161
  }
@@ -3531,7 +3531,7 @@ var ConnectedAccounts = class {
3531
3531
  }
3532
3532
  rawQuery = {
3533
3533
  auth_config_ids: parsedQuery.data.authConfigIds,
3534
- cursor: parsedQuery.data.cursor,
3534
+ cursor: parsedQuery.data.cursor?.toString(),
3535
3535
  labels: parsedQuery.data.labels,
3536
3536
  limit: parsedQuery.data.limit,
3537
3537
  order_by: parsedQuery.data.orderBy,
@@ -4213,7 +4213,7 @@ var TriggerTypeSchema = import_zod8.z.object({
4213
4213
  });
4214
4214
  var TriggersTypeListResponseSchema = import_zod8.z.object({
4215
4215
  items: import_zod8.z.array(TriggerTypeSchema),
4216
- nextCursor: import_zod8.z.string().nullish(),
4216
+ nextCursor: import_zod8.z.string().nullable(),
4217
4217
  totalPages: import_zod8.z.number()
4218
4218
  });
4219
4219
 
@@ -4755,7 +4755,7 @@ var Triggers = class {
4755
4755
  });
4756
4756
  const parsedResult = transform(result).with(TriggersTypeListResponseSchema).using((raw) => ({
4757
4757
  items: raw.items,
4758
- nextCursor: raw.next_cursor,
4758
+ nextCursor: raw.next_cursor ?? null,
4759
4759
  totalPages: raw.total_pages
4760
4760
  }));
4761
4761
  return parsedResult;
@@ -6142,7 +6142,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
6142
6142
  };
6143
6143
 
6144
6144
  // package.json
6145
- var version = "0.1.36-next.7";
6145
+ var version = "0.1.36-next.8";
6146
6146
 
6147
6147
  // src/models/Files.ts
6148
6148
  var Files = class {
package/dist/index.d.cts CHANGED
@@ -506,6 +506,7 @@ declare const ToolListParamsSchema: z.ZodObject<{
506
506
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
507
507
  limit: z.ZodOptional<z.ZodNumber>;
508
508
  search: z.ZodOptional<z.ZodString>;
509
+ authConfigIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
509
510
  }, "strip", z.ZodTypeAny, {
510
511
  tags?: string[] | undefined;
511
512
  scopes?: string[] | undefined;
@@ -513,6 +514,7 @@ declare const ToolListParamsSchema: z.ZodObject<{
513
514
  toolkits?: string[] | undefined;
514
515
  limit?: number | undefined;
515
516
  search?: string | undefined;
517
+ authConfigIds?: string[] | undefined;
516
518
  }, {
517
519
  tags?: string[] | undefined;
518
520
  scopes?: string[] | undefined;
@@ -520,6 +522,7 @@ declare const ToolListParamsSchema: z.ZodObject<{
520
522
  toolkits?: string[] | undefined;
521
523
  limit?: number | undefined;
522
524
  search?: string | undefined;
525
+ authConfigIds?: string[] | undefined;
523
526
  }>;
524
527
  type BaseParams = {
525
528
  limit?: number;
@@ -558,11 +561,16 @@ type SearchOnlyParams = {
558
561
  search: string;
559
562
  tags?: never;
560
563
  };
564
+ type AuthConfigIdsOnlyParams = {
565
+ authConfigIds: string[];
566
+ tools?: never;
567
+ toolkit?: never;
568
+ } & Pick<BaseParams, 'limit' | 'search' | 'tags'>;
561
569
  /**
562
570
  * ToolListParams is the parameters for the list of tools.
563
571
  * You must provide either tools or toolkits, but not both.
564
572
  */
565
- type ToolListParams = ToolsOnlyParams | ToolkitsOnlyParams | ToolkitScopeOnlyParams | SearchOnlyParams | TagsOnlyParams;
573
+ type ToolListParams = ToolsOnlyParams | ToolkitsOnlyParams | ToolkitScopeOnlyParams | SearchOnlyParams | TagsOnlyParams | AuthConfigIdsOnlyParams;
566
574
  /**
567
575
  * CustomAuthParams is the parameters for the custom authentication.
568
576
  */
@@ -29172,7 +29180,7 @@ type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveR
29172
29180
  type ConnectedAccountListResponseItem = Omit<ConnectedAccountRetrieveResponse, 'params'>;
29173
29181
  declare const ConnectedAccountListParamsSchema: z.ZodObject<{
29174
29182
  authConfigIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
29175
- cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29183
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29176
29184
  labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
29177
29185
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29178
29186
  orderBy: z.ZodOptional<z.ZodEnum<["created_at", "updated_at"]>>;
@@ -29181,18 +29189,18 @@ declare const ConnectedAccountListParamsSchema: z.ZodObject<{
29181
29189
  userIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
29182
29190
  }, "strip", z.ZodTypeAny, {
29183
29191
  limit?: number | null | undefined;
29184
- userIds?: string[] | null | undefined;
29185
- cursor?: string | null | undefined;
29186
29192
  authConfigIds?: string[] | null | undefined;
29193
+ userIds?: string[] | null | undefined;
29194
+ cursor?: number | null | undefined;
29187
29195
  labels?: string[] | null | undefined;
29188
29196
  orderBy?: "created_at" | "updated_at" | undefined;
29189
29197
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED")[] | null | undefined;
29190
29198
  toolkitSlugs?: string[] | null | undefined;
29191
29199
  }, {
29192
29200
  limit?: number | null | undefined;
29193
- userIds?: string[] | null | undefined;
29194
- cursor?: string | null | undefined;
29195
29201
  authConfigIds?: string[] | null | undefined;
29202
+ userIds?: string[] | null | undefined;
29203
+ cursor?: number | null | undefined;
29196
29204
  labels?: string[] | null | undefined;
29197
29205
  orderBy?: "created_at" | "updated_at" | undefined;
29198
29206
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED")[] | null | undefined;
@@ -34937,7 +34945,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
34937
34945
  } | undefined;
34938
34946
  testRequestEndpoint?: string | undefined;
34939
34947
  }>, "many">;
34940
- nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34948
+ nextCursor: z.ZodNullable<z.ZodString>;
34941
34949
  totalPages: z.ZodNumber;
34942
34950
  }, "strip", z.ZodTypeAny, {
34943
34951
  items: {
@@ -35782,8 +35790,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
35782
35790
  } | undefined;
35783
35791
  testRequestEndpoint?: string | undefined;
35784
35792
  }[];
35793
+ nextCursor: string | null;
35785
35794
  totalPages: number;
35786
- nextCursor?: string | null | undefined;
35787
35795
  }, {
35788
35796
  items: {
35789
35797
  status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
@@ -36627,8 +36635,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
36627
36635
  } | undefined;
36628
36636
  testRequestEndpoint?: string | undefined;
36629
36637
  }[];
36638
+ nextCursor: string | null;
36630
36639
  totalPages: number;
36631
- nextCursor?: string | null | undefined;
36632
36640
  }>;
36633
36641
  type ConnectedAccountListResponse = z.infer<typeof ConnectedAccountListResponseSchema>;
36634
36642
 
@@ -37163,17 +37171,17 @@ declare const TriggerInstanceListActiveParamsSchema: z.ZodObject<{
37163
37171
  triggerNames: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
37164
37172
  }, "strip", z.ZodTypeAny, {
37165
37173
  limit?: number | undefined;
37174
+ authConfigIds?: string[] | null | undefined;
37166
37175
  connectedAccountIds?: string[] | null | undefined;
37167
37176
  page?: number | undefined;
37168
- authConfigIds?: string[] | null | undefined;
37169
37177
  showDisabled?: boolean | null | undefined;
37170
37178
  triggerIds?: string[] | null | undefined;
37171
37179
  triggerNames?: string[] | null | undefined;
37172
37180
  }, {
37173
37181
  limit?: number | undefined;
37182
+ authConfigIds?: string[] | null | undefined;
37174
37183
  connectedAccountIds?: string[] | null | undefined;
37175
37184
  page?: number | undefined;
37176
- authConfigIds?: string[] | null | undefined;
37177
37185
  showDisabled?: boolean | null | undefined;
37178
37186
  triggerIds?: string[] | null | undefined;
37179
37187
  triggerNames?: string[] | null | undefined;
@@ -37563,7 +37571,7 @@ declare const TriggersTypeListResponseSchema: z.ZodObject<{
37563
37571
  payload: Record<string, unknown>;
37564
37572
  instructions?: string | undefined;
37565
37573
  }>, "many">;
37566
- nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37574
+ nextCursor: z.ZodNullable<z.ZodString>;
37567
37575
  totalPages: z.ZodNumber;
37568
37576
  }, "strip", z.ZodTypeAny, {
37569
37577
  items: {
@@ -37579,8 +37587,8 @@ declare const TriggersTypeListResponseSchema: z.ZodObject<{
37579
37587
  payload: Record<string, unknown>;
37580
37588
  instructions?: string | undefined;
37581
37589
  }[];
37590
+ nextCursor: string | null;
37582
37591
  totalPages: number;
37583
- nextCursor?: string | null | undefined;
37584
37592
  }, {
37585
37593
  items: {
37586
37594
  slug: string;
@@ -37595,8 +37603,8 @@ declare const TriggersTypeListResponseSchema: z.ZodObject<{
37595
37603
  payload: Record<string, unknown>;
37596
37604
  instructions?: string | undefined;
37597
37605
  }[];
37606
+ nextCursor: string | null;
37598
37607
  totalPages: number;
37599
- nextCursor?: string | null | undefined;
37600
37608
  }>;
37601
37609
  type TriggersTypeListResponse = z.infer<typeof TriggersTypeListResponseSchema>;
37602
37610
  type TriggersTypeRetrieveResponse = z.infer<typeof TriggerTypeSchema>;
package/dist/index.d.ts CHANGED
@@ -506,6 +506,7 @@ declare const ToolListParamsSchema: z.ZodObject<{
506
506
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
507
507
  limit: z.ZodOptional<z.ZodNumber>;
508
508
  search: z.ZodOptional<z.ZodString>;
509
+ authConfigIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
509
510
  }, "strip", z.ZodTypeAny, {
510
511
  tags?: string[] | undefined;
511
512
  scopes?: string[] | undefined;
@@ -513,6 +514,7 @@ declare const ToolListParamsSchema: z.ZodObject<{
513
514
  toolkits?: string[] | undefined;
514
515
  limit?: number | undefined;
515
516
  search?: string | undefined;
517
+ authConfigIds?: string[] | undefined;
516
518
  }, {
517
519
  tags?: string[] | undefined;
518
520
  scopes?: string[] | undefined;
@@ -520,6 +522,7 @@ declare const ToolListParamsSchema: z.ZodObject<{
520
522
  toolkits?: string[] | undefined;
521
523
  limit?: number | undefined;
522
524
  search?: string | undefined;
525
+ authConfigIds?: string[] | undefined;
523
526
  }>;
524
527
  type BaseParams = {
525
528
  limit?: number;
@@ -558,11 +561,16 @@ type SearchOnlyParams = {
558
561
  search: string;
559
562
  tags?: never;
560
563
  };
564
+ type AuthConfigIdsOnlyParams = {
565
+ authConfigIds: string[];
566
+ tools?: never;
567
+ toolkit?: never;
568
+ } & Pick<BaseParams, 'limit' | 'search' | 'tags'>;
561
569
  /**
562
570
  * ToolListParams is the parameters for the list of tools.
563
571
  * You must provide either tools or toolkits, but not both.
564
572
  */
565
- type ToolListParams = ToolsOnlyParams | ToolkitsOnlyParams | ToolkitScopeOnlyParams | SearchOnlyParams | TagsOnlyParams;
573
+ type ToolListParams = ToolsOnlyParams | ToolkitsOnlyParams | ToolkitScopeOnlyParams | SearchOnlyParams | TagsOnlyParams | AuthConfigIdsOnlyParams;
566
574
  /**
567
575
  * CustomAuthParams is the parameters for the custom authentication.
568
576
  */
@@ -29172,7 +29180,7 @@ type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveR
29172
29180
  type ConnectedAccountListResponseItem = Omit<ConnectedAccountRetrieveResponse, 'params'>;
29173
29181
  declare const ConnectedAccountListParamsSchema: z.ZodObject<{
29174
29182
  authConfigIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
29175
- cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29183
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29176
29184
  labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
29177
29185
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29178
29186
  orderBy: z.ZodOptional<z.ZodEnum<["created_at", "updated_at"]>>;
@@ -29181,18 +29189,18 @@ declare const ConnectedAccountListParamsSchema: z.ZodObject<{
29181
29189
  userIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
29182
29190
  }, "strip", z.ZodTypeAny, {
29183
29191
  limit?: number | null | undefined;
29184
- userIds?: string[] | null | undefined;
29185
- cursor?: string | null | undefined;
29186
29192
  authConfigIds?: string[] | null | undefined;
29193
+ userIds?: string[] | null | undefined;
29194
+ cursor?: number | null | undefined;
29187
29195
  labels?: string[] | null | undefined;
29188
29196
  orderBy?: "created_at" | "updated_at" | undefined;
29189
29197
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED")[] | null | undefined;
29190
29198
  toolkitSlugs?: string[] | null | undefined;
29191
29199
  }, {
29192
29200
  limit?: number | null | undefined;
29193
- userIds?: string[] | null | undefined;
29194
- cursor?: string | null | undefined;
29195
29201
  authConfigIds?: string[] | null | undefined;
29202
+ userIds?: string[] | null | undefined;
29203
+ cursor?: number | null | undefined;
29196
29204
  labels?: string[] | null | undefined;
29197
29205
  orderBy?: "created_at" | "updated_at" | undefined;
29198
29206
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED")[] | null | undefined;
@@ -34937,7 +34945,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
34937
34945
  } | undefined;
34938
34946
  testRequestEndpoint?: string | undefined;
34939
34947
  }>, "many">;
34940
- nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34948
+ nextCursor: z.ZodNullable<z.ZodString>;
34941
34949
  totalPages: z.ZodNumber;
34942
34950
  }, "strip", z.ZodTypeAny, {
34943
34951
  items: {
@@ -35782,8 +35790,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
35782
35790
  } | undefined;
35783
35791
  testRequestEndpoint?: string | undefined;
35784
35792
  }[];
35793
+ nextCursor: string | null;
35785
35794
  totalPages: number;
35786
- nextCursor?: string | null | undefined;
35787
35795
  }, {
35788
35796
  items: {
35789
35797
  status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
@@ -36627,8 +36635,8 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
36627
36635
  } | undefined;
36628
36636
  testRequestEndpoint?: string | undefined;
36629
36637
  }[];
36638
+ nextCursor: string | null;
36630
36639
  totalPages: number;
36631
- nextCursor?: string | null | undefined;
36632
36640
  }>;
36633
36641
  type ConnectedAccountListResponse = z.infer<typeof ConnectedAccountListResponseSchema>;
36634
36642
 
@@ -37163,17 +37171,17 @@ declare const TriggerInstanceListActiveParamsSchema: z.ZodObject<{
37163
37171
  triggerNames: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
37164
37172
  }, "strip", z.ZodTypeAny, {
37165
37173
  limit?: number | undefined;
37174
+ authConfigIds?: string[] | null | undefined;
37166
37175
  connectedAccountIds?: string[] | null | undefined;
37167
37176
  page?: number | undefined;
37168
- authConfigIds?: string[] | null | undefined;
37169
37177
  showDisabled?: boolean | null | undefined;
37170
37178
  triggerIds?: string[] | null | undefined;
37171
37179
  triggerNames?: string[] | null | undefined;
37172
37180
  }, {
37173
37181
  limit?: number | undefined;
37182
+ authConfigIds?: string[] | null | undefined;
37174
37183
  connectedAccountIds?: string[] | null | undefined;
37175
37184
  page?: number | undefined;
37176
- authConfigIds?: string[] | null | undefined;
37177
37185
  showDisabled?: boolean | null | undefined;
37178
37186
  triggerIds?: string[] | null | undefined;
37179
37187
  triggerNames?: string[] | null | undefined;
@@ -37563,7 +37571,7 @@ declare const TriggersTypeListResponseSchema: z.ZodObject<{
37563
37571
  payload: Record<string, unknown>;
37564
37572
  instructions?: string | undefined;
37565
37573
  }>, "many">;
37566
- nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37574
+ nextCursor: z.ZodNullable<z.ZodString>;
37567
37575
  totalPages: z.ZodNumber;
37568
37576
  }, "strip", z.ZodTypeAny, {
37569
37577
  items: {
@@ -37579,8 +37587,8 @@ declare const TriggersTypeListResponseSchema: z.ZodObject<{
37579
37587
  payload: Record<string, unknown>;
37580
37588
  instructions?: string | undefined;
37581
37589
  }[];
37590
+ nextCursor: string | null;
37582
37591
  totalPages: number;
37583
- nextCursor?: string | null | undefined;
37584
37592
  }, {
37585
37593
  items: {
37586
37594
  slug: string;
@@ -37595,8 +37603,8 @@ declare const TriggersTypeListResponseSchema: z.ZodObject<{
37595
37603
  payload: Record<string, unknown>;
37596
37604
  instructions?: string | undefined;
37597
37605
  }[];
37606
+ nextCursor: string | null;
37598
37607
  totalPages: number;
37599
- nextCursor?: string | null | undefined;
37600
37608
  }>;
37601
37609
  type TriggersTypeListResponse = z.infer<typeof TriggersTypeListResponseSchema>;
37602
37610
  type TriggersTypeRetrieveResponse = z.infer<typeof TriggerTypeSchema>;
package/dist/index.js CHANGED
@@ -114,7 +114,8 @@ var ToolListParamsSchema = z.object({
114
114
  scopes: z.array(z.string()).optional(),
115
115
  tags: z.array(z.string()).optional(),
116
116
  limit: z.number().optional(),
117
- search: z.string().optional()
117
+ search: z.string().optional(),
118
+ authConfigIds: z.array(z.string()).optional()
118
119
  });
119
120
  var CustomAuthParamsSchema = z.object({
120
121
  baseURL: z.string().optional(),
@@ -1544,7 +1545,7 @@ var ConnectedAccountRetrieveResponseSchema = z4.object({
1544
1545
  });
1545
1546
  var ConnectedAccountListParamsSchema = z4.object({
1546
1547
  authConfigIds: z4.array(z4.string()).nullable().optional().describe("The auth config ids of the connected accounts"),
1547
- cursor: z4.string().nullish().describe("The cursor to paginate through the connected accounts"),
1548
+ cursor: z4.number().nullable().optional().describe("The cursor to paginate through the connected accounts"),
1548
1549
  labels: z4.array(z4.string()).nullable().optional().describe("The labels of the connected accounts"),
1549
1550
  limit: z4.number().nullable().optional().describe("The limit of the connected accounts to return"),
1550
1551
  orderBy: z4.enum(["created_at", "updated_at"]).optional().describe("The order by of the connected accounts"),
@@ -1554,7 +1555,7 @@ var ConnectedAccountListParamsSchema = z4.object({
1554
1555
  });
1555
1556
  var ConnectedAccountListResponseSchema = z4.object({
1556
1557
  items: z4.array(ConnectedAccountRetrieveResponseSchema).describe("The list of connected accounts"),
1557
- nextCursor: z4.string().nullish().describe("The next cursor to paginate through the connected accounts"),
1558
+ nextCursor: z4.string().nullable().describe("The next cursor to paginate through the connected accounts"),
1558
1559
  totalPages: z4.number().describe("The total number of pages of connected accounts")
1559
1560
  });
1560
1561
 
@@ -2448,9 +2449,9 @@ var Tools = class {
2448
2449
  cause: queryParams.error
2449
2450
  });
2450
2451
  }
2451
- if (!("tools" in queryParams.data || "toolkits" in queryParams.data || "search" in queryParams.data)) {
2452
+ if (!("tools" in queryParams.data || "toolkits" in queryParams.data || "search" in queryParams.data || "authConfigIds" in queryParams.data)) {
2452
2453
  throw new ValidationError(
2453
- "Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search"
2454
+ "Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search, authConfigIds"
2454
2455
  );
2455
2456
  }
2456
2457
  let limit = "limit" in queryParams.data ? queryParams.data.limit : void 0;
@@ -2463,7 +2464,8 @@ var Tools = class {
2463
2464
  ...limit ? { limit } : {},
2464
2465
  ..."tags" in queryParams.data ? { tags: queryParams.data.tags } : {},
2465
2466
  ..."scopes" in queryParams.data ? { scopes: queryParams.data.scopes } : {},
2466
- ..."search" in queryParams.data ? { search: queryParams.data.search } : {}
2467
+ ..."search" in queryParams.data ? { search: queryParams.data.search } : {},
2468
+ ..."authConfigIds" in queryParams.data ? { auth_config_ids: queryParams.data.authConfigIds } : {}
2467
2469
  };
2468
2470
  logger_default.debug(`Fetching tools with filters: ${JSON.stringify(filters, null, 2)}`);
2469
2471
  const tools = await this.client.tools.list(filters);
@@ -2970,7 +2972,7 @@ var AuthConfigs = class {
2970
2972
  * @private
2971
2973
  */
2972
2974
  parseAuthConfigRetrieveResponse(authConfig) {
2973
- const responseToParse = {
2975
+ const result = AuthConfigRetrieveResponseSchema.safeParse({
2974
2976
  id: authConfig.id,
2975
2977
  name: authConfig.name,
2976
2978
  noOfConnections: authConfig.no_of_connections,
@@ -2988,13 +2990,11 @@ var AuthConfigs = class {
2988
2990
  createdAt: authConfig.created_at,
2989
2991
  lastUpdatedAt: authConfig.last_updated_at,
2990
2992
  restrictToFollowingTools: authConfig.restrict_to_following_tools
2991
- };
2992
- const result = AuthConfigRetrieveResponseSchema.safeParse(responseToParse);
2993
+ });
2993
2994
  if (result.error) {
2994
- logger_default.error("Failed to parse auth config response", {
2995
+ throw new ValidationError("Failed to parse auth config response", {
2995
2996
  cause: result.error
2996
2997
  });
2997
- return responseToParse;
2998
2998
  }
2999
2999
  return result.data;
3000
3000
  }
@@ -3370,7 +3370,7 @@ var ConnectedAccounts = class {
3370
3370
  }
3371
3371
  rawQuery = {
3372
3372
  auth_config_ids: parsedQuery.data.authConfigIds,
3373
- cursor: parsedQuery.data.cursor,
3373
+ cursor: parsedQuery.data.cursor?.toString(),
3374
3374
  labels: parsedQuery.data.labels,
3375
3375
  limit: parsedQuery.data.limit,
3376
3376
  order_by: parsedQuery.data.orderBy,
@@ -4052,7 +4052,7 @@ var TriggerTypeSchema = z6.object({
4052
4052
  });
4053
4053
  var TriggersTypeListResponseSchema = z6.object({
4054
4054
  items: z6.array(TriggerTypeSchema),
4055
- nextCursor: z6.string().nullish(),
4055
+ nextCursor: z6.string().nullable(),
4056
4056
  totalPages: z6.number()
4057
4057
  });
4058
4058
 
@@ -4594,7 +4594,7 @@ var Triggers = class {
4594
4594
  });
4595
4595
  const parsedResult = transform(result).with(TriggersTypeListResponseSchema).using((raw) => ({
4596
4596
  items: raw.items,
4597
- nextCursor: raw.next_cursor,
4597
+ nextCursor: raw.next_cursor ?? null,
4598
4598
  totalPages: raw.total_pages
4599
4599
  }));
4600
4600
  return parsedResult;
@@ -5981,7 +5981,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
5981
5981
  };
5982
5982
 
5983
5983
  // package.json
5984
- var version = "0.1.36-next.7";
5984
+ var version = "0.1.36-next.8";
5985
5985
 
5986
5986
  // src/models/Files.ts
5987
5987
  var Files = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/core",
3
- "version": "0.1.36-next.7",
3
+ "version": "0.1.36-next.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "@composio/json-schema-to-zod": "0.1.10-next.3"
36
36
  },
37
37
  "dependencies": {
38
- "@composio/client": "0.1.0-alpha.26",
38
+ "@composio/client": "0.1.0-alpha.27",
39
39
  "@composio/json-schema-to-zod": "0.1.10-next.3",
40
40
  "@types/json-schema": "^7.0.15",
41
41
  "chalk": "^4.1.2",