@composio/core 0.1.25 → 0.1.26
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 +20 -32
- package/dist/index.d.cts +22 -45
- package/dist/index.d.ts +22 -45
- package/dist/index.js +20 -32
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2723,14 +2723,11 @@ var ToolkitRetrieveCategoriesResponseSchema = import_zod7.z.object({
|
|
|
2723
2723
|
nextCursor: import_zod7.z.string().nullable(),
|
|
2724
2724
|
totalPages: import_zod7.z.number()
|
|
2725
2725
|
});
|
|
2726
|
-
var ToolkitAuthFieldsResponseSchema = import_zod7.z.
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
})
|
|
2732
|
-
)
|
|
2733
|
-
});
|
|
2726
|
+
var ToolkitAuthFieldsResponseSchema = import_zod7.z.array(
|
|
2727
|
+
ToolkitAuthFieldSchema.extend({
|
|
2728
|
+
required: import_zod7.z.boolean().optional()
|
|
2729
|
+
})
|
|
2730
|
+
);
|
|
2734
2731
|
|
|
2735
2732
|
// src/models/AuthConfigs.ts
|
|
2736
2733
|
var AuthConfigs = class {
|
|
@@ -3622,43 +3619,37 @@ var Toolkits = class {
|
|
|
3622
3619
|
}
|
|
3623
3620
|
const authConfig = authScheme ? toolkit.authConfigDetails.find((authConfig2) => authConfig2.mode === authScheme) : toolkit.authConfigDetails[0];
|
|
3624
3621
|
if (!authConfig) {
|
|
3625
|
-
throw new ComposioAuthConfigNotFoundError(
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3622
|
+
throw new ComposioAuthConfigNotFoundError(
|
|
3623
|
+
`Auth schema ${authScheme} not found for toolkit ${toolkitSlug} with auth scheme ${authScheme}`,
|
|
3624
|
+
{
|
|
3625
|
+
meta: {
|
|
3626
|
+
toolkitSlug,
|
|
3627
|
+
authScheme
|
|
3628
|
+
}
|
|
3629
3629
|
}
|
|
3630
|
-
|
|
3630
|
+
);
|
|
3631
3631
|
}
|
|
3632
3632
|
const requiredFields = authConfig.fields[authConfigType].required.map((field) => ({
|
|
3633
3633
|
...field,
|
|
3634
3634
|
required: true
|
|
3635
3635
|
}));
|
|
3636
3636
|
if (requiredOnly) {
|
|
3637
|
-
return
|
|
3638
|
-
authScheme: AuthSchemeEnum.parse(authConfig.mode),
|
|
3639
|
-
fields: requiredFields
|
|
3640
|
-
};
|
|
3637
|
+
return requiredFields;
|
|
3641
3638
|
}
|
|
3642
3639
|
const optionalFields = authConfig.fields[authConfigType].optional.map((field) => ({
|
|
3643
3640
|
...field,
|
|
3644
3641
|
required: false
|
|
3645
3642
|
}));
|
|
3646
|
-
return
|
|
3647
|
-
authScheme: AuthSchemeEnum.parse(authConfig.mode),
|
|
3648
|
-
fields: [...requiredFields, ...optionalFields]
|
|
3649
|
-
};
|
|
3643
|
+
return [...requiredFields, ...optionalFields];
|
|
3650
3644
|
}
|
|
3651
3645
|
/**
|
|
3652
3646
|
* Retrieves the fields required for creating an auth config for a toolkit.
|
|
3653
3647
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
3654
3648
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
3655
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
3649
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
3656
3650
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for creating an auth config
|
|
3657
3651
|
*/
|
|
3658
|
-
async getAuthConfigCreationFields(toolkitSlug, {
|
|
3659
|
-
authScheme,
|
|
3660
|
-
requiredOnly = false
|
|
3661
|
-
} = {}) {
|
|
3652
|
+
async getAuthConfigCreationFields(toolkitSlug, authScheme, { requiredOnly = false } = {}) {
|
|
3662
3653
|
return this.getAuthConfigFields(
|
|
3663
3654
|
toolkitSlug,
|
|
3664
3655
|
authScheme ?? null,
|
|
@@ -3670,13 +3661,10 @@ var Toolkits = class {
|
|
|
3670
3661
|
* Retrieves the fields required for initiating a connected account for a toolkit.
|
|
3671
3662
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
3672
3663
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
3673
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
3664
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
3674
3665
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for initiating a connected account
|
|
3675
3666
|
*/
|
|
3676
|
-
async getConnectedAccountInitiationFields(toolkitSlug, {
|
|
3677
|
-
authScheme,
|
|
3678
|
-
requiredOnly = false
|
|
3679
|
-
} = {}) {
|
|
3667
|
+
async getConnectedAccountInitiationFields(toolkitSlug, authScheme, { requiredOnly = false } = {}) {
|
|
3680
3668
|
return this.getAuthConfigFields(
|
|
3681
3669
|
toolkitSlug,
|
|
3682
3670
|
authScheme ?? null,
|
|
@@ -5740,7 +5728,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5740
5728
|
};
|
|
5741
5729
|
|
|
5742
5730
|
// package.json
|
|
5743
|
-
var version = "0.1.
|
|
5731
|
+
var version = "0.1.26";
|
|
5744
5732
|
|
|
5745
5733
|
// src/composio.ts
|
|
5746
5734
|
var Composio = class _Composio {
|
package/dist/index.d.cts
CHANGED
|
@@ -12241,47 +12241,26 @@ declare const ToolkitRetrieveCategoriesResponseSchema: z.ZodObject<{
|
|
|
12241
12241
|
}>;
|
|
12242
12242
|
type ToolkitCategory = z.infer<typeof ToolkitCategorySchema>;
|
|
12243
12243
|
type ToolkitRetrieveCategoriesResponse = z.infer<typeof ToolkitRetrieveCategoriesResponseSchema>;
|
|
12244
|
-
declare const ToolkitAuthFieldsResponseSchema: z.ZodObject<{
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
} & {
|
|
12252
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
12253
|
-
}, "strip", z.ZodTypeAny, {
|
|
12254
|
-
name: string;
|
|
12255
|
-
type: string;
|
|
12256
|
-
displayName: string;
|
|
12257
|
-
default?: string | null | undefined;
|
|
12258
|
-
required?: boolean | undefined;
|
|
12259
|
-
}, {
|
|
12260
|
-
name: string;
|
|
12261
|
-
type: string;
|
|
12262
|
-
displayName: string;
|
|
12263
|
-
default?: string | null | undefined;
|
|
12264
|
-
required?: boolean | undefined;
|
|
12265
|
-
}>, "many">;
|
|
12244
|
+
declare const ToolkitAuthFieldsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
12245
|
+
name: z.ZodString;
|
|
12246
|
+
displayName: z.ZodString;
|
|
12247
|
+
type: z.ZodString;
|
|
12248
|
+
default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12249
|
+
} & {
|
|
12250
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
12266
12251
|
}, "strip", z.ZodTypeAny, {
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
default?: string | null | undefined;
|
|
12273
|
-
required?: boolean | undefined;
|
|
12274
|
-
}[];
|
|
12252
|
+
name: string;
|
|
12253
|
+
type: string;
|
|
12254
|
+
displayName: string;
|
|
12255
|
+
default?: string | null | undefined;
|
|
12256
|
+
required?: boolean | undefined;
|
|
12275
12257
|
}, {
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
required?: boolean | undefined;
|
|
12283
|
-
}[];
|
|
12284
|
-
}>;
|
|
12258
|
+
name: string;
|
|
12259
|
+
type: string;
|
|
12260
|
+
displayName: string;
|
|
12261
|
+
default?: string | null | undefined;
|
|
12262
|
+
required?: boolean | undefined;
|
|
12263
|
+
}>, "many">;
|
|
12285
12264
|
type ToolkitAuthFieldsResponse = z.infer<typeof ToolkitAuthFieldsResponseSchema>;
|
|
12286
12265
|
|
|
12287
12266
|
/**
|
|
@@ -41037,22 +41016,20 @@ declare class Toolkits {
|
|
|
41037
41016
|
* Retrieves the fields required for creating an auth config for a toolkit.
|
|
41038
41017
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
41039
41018
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
41040
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
41019
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
41041
41020
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for creating an auth config
|
|
41042
41021
|
*/
|
|
41043
|
-
getAuthConfigCreationFields(toolkitSlug: string,
|
|
41044
|
-
authScheme?: AuthSchemeType;
|
|
41022
|
+
getAuthConfigCreationFields(toolkitSlug: string, authScheme: AuthSchemeType, { requiredOnly }?: {
|
|
41045
41023
|
requiredOnly?: boolean;
|
|
41046
41024
|
}): Promise<ToolkitAuthFieldsResponse>;
|
|
41047
41025
|
/**
|
|
41048
41026
|
* Retrieves the fields required for initiating a connected account for a toolkit.
|
|
41049
41027
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
41050
41028
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
41051
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
41029
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
41052
41030
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for initiating a connected account
|
|
41053
41031
|
*/
|
|
41054
|
-
getConnectedAccountInitiationFields(toolkitSlug: string,
|
|
41055
|
-
authScheme?: AuthSchemeType;
|
|
41032
|
+
getConnectedAccountInitiationFields(toolkitSlug: string, authScheme: AuthSchemeType, { requiredOnly }?: {
|
|
41056
41033
|
requiredOnly?: boolean;
|
|
41057
41034
|
}): Promise<ToolkitAuthFieldsResponse>;
|
|
41058
41035
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -12241,47 +12241,26 @@ declare const ToolkitRetrieveCategoriesResponseSchema: z.ZodObject<{
|
|
|
12241
12241
|
}>;
|
|
12242
12242
|
type ToolkitCategory = z.infer<typeof ToolkitCategorySchema>;
|
|
12243
12243
|
type ToolkitRetrieveCategoriesResponse = z.infer<typeof ToolkitRetrieveCategoriesResponseSchema>;
|
|
12244
|
-
declare const ToolkitAuthFieldsResponseSchema: z.ZodObject<{
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
} & {
|
|
12252
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
12253
|
-
}, "strip", z.ZodTypeAny, {
|
|
12254
|
-
name: string;
|
|
12255
|
-
type: string;
|
|
12256
|
-
displayName: string;
|
|
12257
|
-
default?: string | null | undefined;
|
|
12258
|
-
required?: boolean | undefined;
|
|
12259
|
-
}, {
|
|
12260
|
-
name: string;
|
|
12261
|
-
type: string;
|
|
12262
|
-
displayName: string;
|
|
12263
|
-
default?: string | null | undefined;
|
|
12264
|
-
required?: boolean | undefined;
|
|
12265
|
-
}>, "many">;
|
|
12244
|
+
declare const ToolkitAuthFieldsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
12245
|
+
name: z.ZodString;
|
|
12246
|
+
displayName: z.ZodString;
|
|
12247
|
+
type: z.ZodString;
|
|
12248
|
+
default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12249
|
+
} & {
|
|
12250
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
12266
12251
|
}, "strip", z.ZodTypeAny, {
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
default?: string | null | undefined;
|
|
12273
|
-
required?: boolean | undefined;
|
|
12274
|
-
}[];
|
|
12252
|
+
name: string;
|
|
12253
|
+
type: string;
|
|
12254
|
+
displayName: string;
|
|
12255
|
+
default?: string | null | undefined;
|
|
12256
|
+
required?: boolean | undefined;
|
|
12275
12257
|
}, {
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
required?: boolean | undefined;
|
|
12283
|
-
}[];
|
|
12284
|
-
}>;
|
|
12258
|
+
name: string;
|
|
12259
|
+
type: string;
|
|
12260
|
+
displayName: string;
|
|
12261
|
+
default?: string | null | undefined;
|
|
12262
|
+
required?: boolean | undefined;
|
|
12263
|
+
}>, "many">;
|
|
12285
12264
|
type ToolkitAuthFieldsResponse = z.infer<typeof ToolkitAuthFieldsResponseSchema>;
|
|
12286
12265
|
|
|
12287
12266
|
/**
|
|
@@ -41037,22 +41016,20 @@ declare class Toolkits {
|
|
|
41037
41016
|
* Retrieves the fields required for creating an auth config for a toolkit.
|
|
41038
41017
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
41039
41018
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
41040
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
41019
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
41041
41020
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for creating an auth config
|
|
41042
41021
|
*/
|
|
41043
|
-
getAuthConfigCreationFields(toolkitSlug: string,
|
|
41044
|
-
authScheme?: AuthSchemeType;
|
|
41022
|
+
getAuthConfigCreationFields(toolkitSlug: string, authScheme: AuthSchemeType, { requiredOnly }?: {
|
|
41045
41023
|
requiredOnly?: boolean;
|
|
41046
41024
|
}): Promise<ToolkitAuthFieldsResponse>;
|
|
41047
41025
|
/**
|
|
41048
41026
|
* Retrieves the fields required for initiating a connected account for a toolkit.
|
|
41049
41027
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
41050
41028
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
41051
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
41029
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
41052
41030
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for initiating a connected account
|
|
41053
41031
|
*/
|
|
41054
|
-
getConnectedAccountInitiationFields(toolkitSlug: string,
|
|
41055
|
-
authScheme?: AuthSchemeType;
|
|
41032
|
+
getConnectedAccountInitiationFields(toolkitSlug: string, authScheme: AuthSchemeType, { requiredOnly }?: {
|
|
41056
41033
|
requiredOnly?: boolean;
|
|
41057
41034
|
}): Promise<ToolkitAuthFieldsResponse>;
|
|
41058
41035
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2573,14 +2573,11 @@ var ToolkitRetrieveCategoriesResponseSchema = z5.object({
|
|
|
2573
2573
|
nextCursor: z5.string().nullable(),
|
|
2574
2574
|
totalPages: z5.number()
|
|
2575
2575
|
});
|
|
2576
|
-
var ToolkitAuthFieldsResponseSchema = z5.
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
})
|
|
2582
|
-
)
|
|
2583
|
-
});
|
|
2576
|
+
var ToolkitAuthFieldsResponseSchema = z5.array(
|
|
2577
|
+
ToolkitAuthFieldSchema.extend({
|
|
2578
|
+
required: z5.boolean().optional()
|
|
2579
|
+
})
|
|
2580
|
+
);
|
|
2584
2581
|
|
|
2585
2582
|
// src/models/AuthConfigs.ts
|
|
2586
2583
|
var AuthConfigs = class {
|
|
@@ -3472,43 +3469,37 @@ var Toolkits = class {
|
|
|
3472
3469
|
}
|
|
3473
3470
|
const authConfig = authScheme ? toolkit.authConfigDetails.find((authConfig2) => authConfig2.mode === authScheme) : toolkit.authConfigDetails[0];
|
|
3474
3471
|
if (!authConfig) {
|
|
3475
|
-
throw new ComposioAuthConfigNotFoundError(
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3472
|
+
throw new ComposioAuthConfigNotFoundError(
|
|
3473
|
+
`Auth schema ${authScheme} not found for toolkit ${toolkitSlug} with auth scheme ${authScheme}`,
|
|
3474
|
+
{
|
|
3475
|
+
meta: {
|
|
3476
|
+
toolkitSlug,
|
|
3477
|
+
authScheme
|
|
3478
|
+
}
|
|
3479
3479
|
}
|
|
3480
|
-
|
|
3480
|
+
);
|
|
3481
3481
|
}
|
|
3482
3482
|
const requiredFields = authConfig.fields[authConfigType].required.map((field) => ({
|
|
3483
3483
|
...field,
|
|
3484
3484
|
required: true
|
|
3485
3485
|
}));
|
|
3486
3486
|
if (requiredOnly) {
|
|
3487
|
-
return
|
|
3488
|
-
authScheme: AuthSchemeEnum.parse(authConfig.mode),
|
|
3489
|
-
fields: requiredFields
|
|
3490
|
-
};
|
|
3487
|
+
return requiredFields;
|
|
3491
3488
|
}
|
|
3492
3489
|
const optionalFields = authConfig.fields[authConfigType].optional.map((field) => ({
|
|
3493
3490
|
...field,
|
|
3494
3491
|
required: false
|
|
3495
3492
|
}));
|
|
3496
|
-
return
|
|
3497
|
-
authScheme: AuthSchemeEnum.parse(authConfig.mode),
|
|
3498
|
-
fields: [...requiredFields, ...optionalFields]
|
|
3499
|
-
};
|
|
3493
|
+
return [...requiredFields, ...optionalFields];
|
|
3500
3494
|
}
|
|
3501
3495
|
/**
|
|
3502
3496
|
* Retrieves the fields required for creating an auth config for a toolkit.
|
|
3503
3497
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
3504
3498
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
3505
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
3499
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
3506
3500
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for creating an auth config
|
|
3507
3501
|
*/
|
|
3508
|
-
async getAuthConfigCreationFields(toolkitSlug, {
|
|
3509
|
-
authScheme,
|
|
3510
|
-
requiredOnly = false
|
|
3511
|
-
} = {}) {
|
|
3502
|
+
async getAuthConfigCreationFields(toolkitSlug, authScheme, { requiredOnly = false } = {}) {
|
|
3512
3503
|
return this.getAuthConfigFields(
|
|
3513
3504
|
toolkitSlug,
|
|
3514
3505
|
authScheme ?? null,
|
|
@@ -3520,13 +3511,10 @@ var Toolkits = class {
|
|
|
3520
3511
|
* Retrieves the fields required for initiating a connected account for a toolkit.
|
|
3521
3512
|
* @param toolkitSlug - The slug of the toolkit to retrieve the fields for
|
|
3522
3513
|
* @param authScheme - The auth scheme to retrieve the fields for
|
|
3523
|
-
* @param requiredOnly - Whether to only return the required fields
|
|
3514
|
+
* @param options.requiredOnly - Whether to only return the required fields
|
|
3524
3515
|
* @returns {Promise<ToolkitAuthFieldsResponse>} The fields required for initiating a connected account
|
|
3525
3516
|
*/
|
|
3526
|
-
async getConnectedAccountInitiationFields(toolkitSlug, {
|
|
3527
|
-
authScheme,
|
|
3528
|
-
requiredOnly = false
|
|
3529
|
-
} = {}) {
|
|
3517
|
+
async getConnectedAccountInitiationFields(toolkitSlug, authScheme, { requiredOnly = false } = {}) {
|
|
3530
3518
|
return this.getAuthConfigFields(
|
|
3531
3519
|
toolkitSlug,
|
|
3532
3520
|
authScheme ?? null,
|
|
@@ -5590,7 +5578,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5590
5578
|
};
|
|
5591
5579
|
|
|
5592
5580
|
// package.json
|
|
5593
|
-
var version = "0.1.
|
|
5581
|
+
var version = "0.1.26";
|
|
5594
5582
|
|
|
5595
5583
|
// src/composio.ts
|
|
5596
5584
|
var Composio = class _Composio {
|