@composio/client 0.1.0-alpha.56 → 0.1.0-alpha.58
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/CHANGELOG.md +44 -0
- package/client.d.mts +6 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -2
- package/client.d.ts.map +1 -1
- package/client.js +19 -3
- package/client.js.map +1 -1
- package/client.mjs +19 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +19 -5
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +19 -5
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +8 -2
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +8 -2
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/cli/cli.d.mts +120 -0
- package/resources/cli/cli.d.mts.map +1 -0
- package/resources/cli/cli.d.ts +120 -0
- package/resources/cli/cli.d.ts.map +1 -0
- package/resources/cli/cli.js +36 -0
- package/resources/cli/cli.js.map +1 -0
- package/resources/cli/cli.mjs +31 -0
- package/resources/cli/cli.mjs.map +1 -0
- package/resources/cli/index.d.mts +3 -0
- package/resources/cli/index.d.mts.map +1 -0
- package/resources/cli/index.d.ts +3 -0
- package/resources/cli/index.d.ts.map +1 -0
- package/resources/cli/index.js +9 -0
- package/resources/cli/index.js.map +1 -0
- package/resources/cli/index.mjs +4 -0
- package/resources/cli/index.mjs.map +1 -0
- package/resources/cli/realtime.d.mts +53 -0
- package/resources/cli/realtime.d.mts.map +1 -0
- package/resources/cli/realtime.d.ts +53 -0
- package/resources/cli/realtime.d.ts.map +1 -0
- package/resources/cli/realtime.js +22 -0
- package/resources/cli/realtime.js.map +1 -0
- package/resources/cli/realtime.mjs +18 -0
- package/resources/cli/realtime.mjs.map +1 -0
- package/resources/cli.d.mts +1 -95
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -95
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +2 -23
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +1 -21
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +11 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +11 -4
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +9 -2
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +9 -2
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/logs/index.d.mts +4 -0
- package/resources/logs/index.d.mts.map +1 -0
- package/resources/logs/index.d.ts +4 -0
- package/resources/logs/index.d.ts.map +1 -0
- package/resources/logs/index.js +11 -0
- package/resources/logs/index.js.map +1 -0
- package/resources/logs/index.mjs +5 -0
- package/resources/logs/index.mjs.map +1 -0
- package/resources/logs/logs.d.mts +14 -0
- package/resources/logs/logs.d.mts.map +1 -0
- package/resources/logs/logs.d.ts +14 -0
- package/resources/logs/logs.d.ts.map +1 -0
- package/resources/logs/logs.js +21 -0
- package/resources/logs/logs.js.map +1 -0
- package/resources/logs/logs.mjs +16 -0
- package/resources/logs/logs.mjs.map +1 -0
- package/resources/logs/tools.d.mts +151 -0
- package/resources/logs/tools.d.mts.map +1 -0
- package/resources/logs/tools.d.ts +151 -0
- package/resources/logs/tools.d.ts.map +1 -0
- package/resources/logs/tools.js +33 -0
- package/resources/logs/tools.js.map +1 -0
- package/resources/logs/tools.mjs +29 -0
- package/resources/logs/tools.mjs.map +1 -0
- package/resources/logs/triggers.d.mts +109 -0
- package/resources/logs/triggers.d.mts.map +1 -0
- package/resources/logs/triggers.d.ts +109 -0
- package/resources/logs/triggers.d.ts.map +1 -0
- package/resources/logs/triggers.js +21 -0
- package/resources/logs/triggers.js.map +1 -0
- package/resources/logs/triggers.mjs +17 -0
- package/resources/logs/triggers.mjs.map +1 -0
- package/resources/logs.d.mts +2 -0
- package/resources/logs.d.mts.map +1 -0
- package/resources/logs.d.ts +2 -0
- package/resources/logs.d.ts.map +1 -0
- package/resources/logs.js +6 -0
- package/resources/logs.js.map +1 -0
- package/resources/logs.mjs +3 -0
- package/resources/logs.mjs.map +1 -0
- package/resources/tool-router/index.d.mts +1 -1
- package/resources/tool-router/index.d.mts.map +1 -1
- package/resources/tool-router/index.d.ts +1 -1
- package/resources/tool-router/index.d.ts.map +1 -1
- package/resources/tool-router/index.js.map +1 -1
- package/resources/tool-router/index.mjs.map +1 -1
- package/resources/tool-router/session.d.mts +293 -5
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +293 -5
- package/resources/tool-router/session.d.ts.map +1 -1
- package/resources/tool-router/session.js +20 -0
- package/resources/tool-router/session.js.map +1 -1
- package/resources/tool-router/session.mjs +20 -0
- package/resources/tool-router/session.mjs.map +1 -1
- package/resources/tool-router/tool-router.d.mts +2 -2
- package/resources/tool-router/tool-router.d.mts.map +1 -1
- package/resources/tool-router/tool-router.d.ts +2 -2
- package/resources/tool-router/tool-router.d.ts.map +1 -1
- package/resources/tool-router/tool-router.js.map +1 -1
- package/resources/tool-router/tool-router.mjs.map +1 -1
- package/resources/toolkits.d.mts +0 -8
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +0 -8
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/tools.d.mts +38 -22
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +38 -22
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +11 -2
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +11 -2
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/manage.d.mts +9 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -1
- package/resources/trigger-instances/manage.d.ts +9 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -1
- package/resources/trigger-instances/manage.js +9 -0
- package/resources/trigger-instances/manage.js.map +1 -1
- package/resources/trigger-instances/manage.mjs +9 -0
- package/resources/trigger-instances/manage.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +11 -0
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +11 -0
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +11 -0
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +11 -0
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +0 -8
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +0 -8
- package/resources/triggers-types.d.ts.map +1 -1
- package/src/client.ts +31 -4
- package/src/internal/parse.ts +6 -0
- package/src/resources/auth-configs.ts +24 -5
- package/src/resources/cli/cli.ts +163 -0
- package/src/resources/cli/index.ts +15 -0
- package/src/resources/cli/realtime.ts +72 -0
- package/src/resources/cli.ts +1 -120
- package/src/resources/connected-accounts.ts +13 -4
- package/src/resources/index.ts +3 -1
- package/src/resources/logs/index.ts +11 -0
- package/src/resources/logs/logs.ts +31 -0
- package/src/resources/logs/tools.ts +214 -0
- package/src/resources/logs/triggers.ts +157 -0
- package/src/resources/logs.ts +3 -0
- package/src/resources/tool-router/index.ts +2 -0
- package/src/resources/tool-router/session.ts +340 -5
- package/src/resources/tool-router/tool-router.ts +4 -0
- package/src/resources/toolkits.ts +0 -10
- package/src/resources/tools.ts +52 -25
- package/src/resources/trigger-instances/manage.ts +9 -0
- package/src/resources/trigger-instances/trigger-instances.ts +11 -0
- package/src/resources/triggers-types.ts +0 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/tools.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
3
4
|
import { path } from "../internal/utils/path.mjs";
|
|
4
5
|
export class Tools extends APIResource {
|
|
5
6
|
/**
|
|
@@ -39,8 +40,16 @@ export class Tools extends APIResource {
|
|
|
39
40
|
* const response = await client.tools.execute('tool_slug');
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
|
-
execute(toolSlug,
|
|
43
|
-
|
|
43
|
+
execute(toolSlug, params = {}, options) {
|
|
44
|
+
const { 'x-llm-gateway-headers': xLlmGatewayHeaders, ...body } = params ?? {};
|
|
45
|
+
return this._client.post(path `/api/v3/tools/execute/${toolSlug}`, {
|
|
46
|
+
body,
|
|
47
|
+
...options,
|
|
48
|
+
headers: buildHeaders([
|
|
49
|
+
{ ...(xLlmGatewayHeaders != null ? { 'x-llm-gateway-headers': xLlmGatewayHeaders } : undefined) },
|
|
50
|
+
options?.headers,
|
|
51
|
+
]),
|
|
52
|
+
});
|
|
44
53
|
}
|
|
45
54
|
/**
|
|
46
55
|
* Uses AI to translate a natural language description into structured arguments
|
package/resources/tools.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAA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G,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,IAAqB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -3,6 +3,11 @@ import { APIPromise } from "../../core/api-promise.mjs";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
4
|
export declare class Manage extends APIResource {
|
|
5
5
|
/**
|
|
6
|
+
* Updates the status of a trigger instance to enable or disable it. Disabling a
|
|
7
|
+
* trigger pauses event listening without deleting the trigger configuration.
|
|
8
|
+
* Re-enabling restores the trigger to its active state. Use this for temporary
|
|
9
|
+
* maintenance or to control trigger execution.
|
|
10
|
+
*
|
|
6
11
|
* @example
|
|
7
12
|
* ```ts
|
|
8
13
|
* const manage = await client.triggerInstances.manage.update(
|
|
@@ -13,6 +18,10 @@ export declare class Manage extends APIResource {
|
|
|
13
18
|
*/
|
|
14
19
|
update(triggerID: string, body: ManageUpdateParams, options?: RequestOptions): APIPromise<ManageUpdateResponse>;
|
|
15
20
|
/**
|
|
21
|
+
* Permanently deletes a trigger instance. This stops the trigger from listening
|
|
22
|
+
* for events and removes it from your project. Use the PATCH endpoint with status
|
|
23
|
+
* "disable" if you want to temporarily pause a trigger instead.
|
|
24
|
+
*
|
|
16
25
|
* @example
|
|
17
26
|
* ```ts
|
|
18
27
|
* const manage = await client.triggerInstances.manage.delete(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage.d.mts","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"manage.d.mts","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGtF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -3,6 +3,11 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
4
|
export declare class Manage extends APIResource {
|
|
5
5
|
/**
|
|
6
|
+
* Updates the status of a trigger instance to enable or disable it. Disabling a
|
|
7
|
+
* trigger pauses event listening without deleting the trigger configuration.
|
|
8
|
+
* Re-enabling restores the trigger to its active state. Use this for temporary
|
|
9
|
+
* maintenance or to control trigger execution.
|
|
10
|
+
*
|
|
6
11
|
* @example
|
|
7
12
|
* ```ts
|
|
8
13
|
* const manage = await client.triggerInstances.manage.update(
|
|
@@ -13,6 +18,10 @@ export declare class Manage extends APIResource {
|
|
|
13
18
|
*/
|
|
14
19
|
update(triggerID: string, body: ManageUpdateParams, options?: RequestOptions): APIPromise<ManageUpdateResponse>;
|
|
15
20
|
/**
|
|
21
|
+
* Permanently deletes a trigger instance. This stops the trigger from listening
|
|
22
|
+
* for events and removes it from your project. Use the PATCH endpoint with status
|
|
23
|
+
* "disable" if you want to temporarily pause a trigger instead.
|
|
24
|
+
*
|
|
16
25
|
* @example
|
|
17
26
|
* ```ts
|
|
18
27
|
* const manage = await client.triggerInstances.manage.delete(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGtF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -6,6 +6,11 @@ const resource_1 = require("../../core/resource.js");
|
|
|
6
6
|
const path_1 = require("../../internal/utils/path.js");
|
|
7
7
|
class Manage extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
+
* Updates the status of a trigger instance to enable or disable it. Disabling a
|
|
10
|
+
* trigger pauses event listening without deleting the trigger configuration.
|
|
11
|
+
* Re-enabling restores the trigger to its active state. Use this for temporary
|
|
12
|
+
* maintenance or to control trigger execution.
|
|
13
|
+
*
|
|
9
14
|
* @example
|
|
10
15
|
* ```ts
|
|
11
16
|
* const manage = await client.triggerInstances.manage.update(
|
|
@@ -18,6 +23,10 @@ class Manage extends resource_1.APIResource {
|
|
|
18
23
|
return this._client.patch((0, path_1.path) `/api/v3/trigger_instances/manage/${triggerID}`, { body, ...options });
|
|
19
24
|
}
|
|
20
25
|
/**
|
|
26
|
+
* Permanently deletes a trigger instance. This stops the trigger from listening
|
|
27
|
+
* for events and removes it from your project. Use the PATCH endpoint with status
|
|
28
|
+
* "disable" if you want to temporarily pause a trigger instead.
|
|
29
|
+
*
|
|
21
30
|
* @example
|
|
22
31
|
* ```ts
|
|
23
32
|
* const manage = await client.triggerInstances.manage.delete(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage.js","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"manage.js","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAwB,EACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,oCAAoC,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,oCAAoC,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF;AAtCD,wBAsCC"}
|
|
@@ -3,6 +3,11 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
3
3
|
import { path } from "../../internal/utils/path.mjs";
|
|
4
4
|
export class Manage extends APIResource {
|
|
5
5
|
/**
|
|
6
|
+
* Updates the status of a trigger instance to enable or disable it. Disabling a
|
|
7
|
+
* trigger pauses event listening without deleting the trigger configuration.
|
|
8
|
+
* Re-enabling restores the trigger to its active state. Use this for temporary
|
|
9
|
+
* maintenance or to control trigger execution.
|
|
10
|
+
*
|
|
6
11
|
* @example
|
|
7
12
|
* ```ts
|
|
8
13
|
* const manage = await client.triggerInstances.manage.update(
|
|
@@ -15,6 +20,10 @@ export class Manage extends APIResource {
|
|
|
15
20
|
return this._client.patch(path `/api/v3/trigger_instances/manage/${triggerID}`, { body, ...options });
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
23
|
+
* Permanently deletes a trigger instance. This stops the trigger from listening
|
|
24
|
+
* for events and removes it from your project. Use the PATCH endpoint with status
|
|
25
|
+
* "disable" if you want to temporarily pause a trigger instead.
|
|
26
|
+
*
|
|
18
27
|
* @example
|
|
19
28
|
* ```ts
|
|
20
29
|
* const manage = await client.triggerInstances.manage.delete(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage.mjs","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"manage.mjs","sourceRoot":"","sources":["../../src/resources/trigger-instances/manage.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAwB,EACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,oCAAoC,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,oCAAoC,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -6,6 +6,11 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
6
6
|
export declare class TriggerInstances extends APIResource {
|
|
7
7
|
manage: ManageAPI.Manage;
|
|
8
8
|
/**
|
|
9
|
+
* Retrieves all active trigger instances for your project. Triggers listen for
|
|
10
|
+
* events from connected accounts (e.g., new emails, Slack messages, GitHub
|
|
11
|
+
* commits) and can invoke webhooks or workflows. Use filters to find triggers for
|
|
12
|
+
* specific users, connected accounts, or trigger types.
|
|
13
|
+
*
|
|
9
14
|
* @example
|
|
10
15
|
* ```ts
|
|
11
16
|
* const response = await client.triggerInstances.listActive();
|
|
@@ -13,6 +18,12 @@ export declare class TriggerInstances extends APIResource {
|
|
|
13
18
|
*/
|
|
14
19
|
listActive(query?: TriggerInstanceListActiveParams | null | undefined, options?: RequestOptions): APIPromise<TriggerInstanceListActiveResponse>;
|
|
15
20
|
/**
|
|
21
|
+
* Creates a new trigger instance or updates an existing one with the same
|
|
22
|
+
* configuration. Triggers listen for events from external services (webhooks or
|
|
23
|
+
* polling) and can invoke your workflows. If a matching trigger already exists and
|
|
24
|
+
* is disabled, it will be re-enabled. Requires a connected account ID to associate
|
|
25
|
+
* the trigger with a specific user connection.
|
|
26
|
+
*
|
|
16
27
|
* @example
|
|
17
28
|
* ```ts
|
|
18
29
|
* const response = await client.triggerInstances.upsert(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-instances.d.mts","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE;OAC1E,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D
|
|
1
|
+
{"version":3,"file":"trigger-instances.d.mts","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE;OAC1E,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC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BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -6,6 +6,11 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
6
6
|
export declare class TriggerInstances extends APIResource {
|
|
7
7
|
manage: ManageAPI.Manage;
|
|
8
8
|
/**
|
|
9
|
+
* Retrieves all active trigger instances for your project. Triggers listen for
|
|
10
|
+
* events from connected accounts (e.g., new emails, Slack messages, GitHub
|
|
11
|
+
* commits) and can invoke webhooks or workflows. Use filters to find triggers for
|
|
12
|
+
* specific users, connected accounts, or trigger types.
|
|
13
|
+
*
|
|
9
14
|
* @example
|
|
10
15
|
* ```ts
|
|
11
16
|
* const response = await client.triggerInstances.listActive();
|
|
@@ -13,6 +18,12 @@ export declare class TriggerInstances extends APIResource {
|
|
|
13
18
|
*/
|
|
14
19
|
listActive(query?: TriggerInstanceListActiveParams | null | undefined, options?: RequestOptions): APIPromise<TriggerInstanceListActiveResponse>;
|
|
15
20
|
/**
|
|
21
|
+
* Creates a new trigger instance or updates an existing one with the same
|
|
22
|
+
* configuration. Triggers listen for events from external services (webhooks or
|
|
23
|
+
* polling) and can invoke your workflows. If a matching trigger already exists and
|
|
24
|
+
* is disabled, it will be re-enabled. Requires a connected account ID to associate
|
|
25
|
+
* the trigger with a specific user connection.
|
|
26
|
+
*
|
|
16
27
|
* @example
|
|
17
28
|
* ```ts
|
|
18
29
|
* const response = await client.triggerInstances.upsert(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-instances.d.ts","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE;OAC1E,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D
|
|
1
|
+
{"version":3,"file":"trigger-instances.d.ts","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE;OAC1E,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;OAUG;IACH,UAAU,CACR,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,2BAA2B,GAAG,IAAI,GAAG,SAAc,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;CAG7C;AAED,MAAM,WAAW,iCAAiC;IAChD,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,EAAE,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC;IAErD,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,yBAAiB,iCAAiC,CAAC;IACjD,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,oBAAoB,EAAE,MAAM,CAAC;QA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MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE7D;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE5C;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE3C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -13,6 +13,11 @@ class TriggerInstances extends resource_1.APIResource {
|
|
|
13
13
|
this.manage = new ManageAPI.Manage(this._client);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
+
* Retrieves all active trigger instances for your project. Triggers listen for
|
|
17
|
+
* events from connected accounts (e.g., new emails, Slack messages, GitHub
|
|
18
|
+
* commits) and can invoke webhooks or workflows. Use filters to find triggers for
|
|
19
|
+
* specific users, connected accounts, or trigger types.
|
|
20
|
+
*
|
|
16
21
|
* @example
|
|
17
22
|
* ```ts
|
|
18
23
|
* const response = await client.triggerInstances.listActive();
|
|
@@ -22,6 +27,12 @@ class TriggerInstances extends resource_1.APIResource {
|
|
|
22
27
|
return this._client.get('/api/v3/trigger_instances/active', { query, ...options });
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
30
|
+
* Creates a new trigger instance or updates an existing one with the same
|
|
31
|
+
* configuration. Triggers listen for events from external services (webhooks or
|
|
32
|
+
* polling) and can invoke your workflows. If a matching trigger already exists and
|
|
33
|
+
* is disabled, it will be re-enabled. Requires a connected account ID to associate
|
|
34
|
+
* the trigger with a specific user connection.
|
|
35
|
+
*
|
|
25
36
|
* @example
|
|
26
37
|
* ```ts
|
|
27
38
|
* const response = await client.triggerInstances.upsert(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-instances.js","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAkG;AAGlG,uDAAiD;AAEjD,MAAa,gBAAiB,SAAQ,sBAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"trigger-instances.js","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAkG;AAGlG,uDAAiD;AAEjD,MAAa,gBAAiB,SAAQ,sBAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyChE,CAAC;IAvCC;;;;;;;;;;OAUG;IACH,UAAU,CACR,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,IAAY,EACZ,OAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,6BAA6B,IAAI,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF;AA1CD,4CA0CC;AAsQD,gBAAgB,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -9,6 +9,11 @@ export class TriggerInstances extends APIResource {
|
|
|
9
9
|
this.manage = new ManageAPI.Manage(this._client);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
+
* Retrieves all active trigger instances for your project. Triggers listen for
|
|
13
|
+
* events from connected accounts (e.g., new emails, Slack messages, GitHub
|
|
14
|
+
* commits) and can invoke webhooks or workflows. Use filters to find triggers for
|
|
15
|
+
* specific users, connected accounts, or trigger types.
|
|
16
|
+
*
|
|
12
17
|
* @example
|
|
13
18
|
* ```ts
|
|
14
19
|
* const response = await client.triggerInstances.listActive();
|
|
@@ -18,6 +23,12 @@ export class TriggerInstances extends APIResource {
|
|
|
18
23
|
return this._client.get('/api/v3/trigger_instances/active', { query, ...options });
|
|
19
24
|
}
|
|
20
25
|
/**
|
|
26
|
+
* Creates a new trigger instance or updates an existing one with the same
|
|
27
|
+
* configuration. Triggers listen for events from external services (webhooks or
|
|
28
|
+
* polling) and can invoke your workflows. If a matching trigger already exists and
|
|
29
|
+
* is disabled, it will be re-enabled. Requires a connected account ID to associate
|
|
30
|
+
* the trigger with a specific user connection.
|
|
31
|
+
*
|
|
21
32
|
* @example
|
|
22
33
|
* ```ts
|
|
23
34
|
* const response = await client.triggerInstances.upsert(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-instances.mjs","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAkE;OAG1E,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"trigger-instances.mjs","sourceRoot":"","sources":["../../src/resources/trigger-instances/trigger-instances.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAkE;OAG1E,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyChE,CAAC;IAvCC;;;;;;;;;;OAUG;IACH,UAAU,CACR,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,IAAY,EACZ,OAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,6BAA6B,IAAI,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF;AAsQD,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -47,10 +47,6 @@ export interface TriggersTypeRetrieveResponse {
|
|
|
47
47
|
* Unique identifier for the trigger type
|
|
48
48
|
*/
|
|
49
49
|
slug: string;
|
|
50
|
-
/**
|
|
51
|
-
* Lifecycle status of the trigger
|
|
52
|
-
*/
|
|
53
|
-
status: string;
|
|
54
50
|
/**
|
|
55
51
|
* Information about the toolkit that provides this trigger
|
|
56
52
|
*/
|
|
@@ -120,10 +116,6 @@ export declare namespace TriggersTypeListResponse {
|
|
|
120
116
|
* Unique identifier for the trigger type
|
|
121
117
|
*/
|
|
122
118
|
slug: string;
|
|
123
|
-
/**
|
|
124
|
-
* Lifecycle status of the trigger
|
|
125
|
-
*/
|
|
126
|
-
status: string;
|
|
127
119
|
/**
|
|
128
120
|
* Information about the toolkit that provides this trigger
|
|
129
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers-types.d.mts","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;OAGG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gCAAgC,CAAC;CAGrF;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"triggers-types.d.mts","sourceR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AM,CAAA;KAAE,CAAC;CACvD;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvD;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -47,10 +47,6 @@ export interface TriggersTypeRetrieveResponse {
|
|
|
47
47
|
* Unique identifier for the trigger type
|
|
48
48
|
*/
|
|
49
49
|
slug: string;
|
|
50
|
-
/**
|
|
51
|
-
* Lifecycle status of the trigger
|
|
52
|
-
*/
|
|
53
|
-
status: string;
|
|
54
50
|
/**
|
|
55
51
|
* Information about the toolkit that provides this trigger
|
|
56
52
|
*/
|
|
@@ -120,10 +116,6 @@ export declare namespace TriggersTypeListResponse {
|
|
|
120
116
|
* Unique identifier for the trigger type
|
|
121
117
|
*/
|
|
122
118
|
slug: string;
|
|
123
|
-
/**
|
|
124
|
-
* Lifecycle status of the trigger
|
|
125
|
-
*/
|
|
126
|
-
status: string;
|
|
127
119
|
/**
|
|
128
120
|
* Information about the toolkit that provides this trigger
|
|
129
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers-types.d.ts","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"OAE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AG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvD;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
package/src/client.ts
CHANGED
|
@@ -33,7 +33,6 @@ import {
|
|
|
33
33
|
AuthConfigUpdateStatusResponse,
|
|
34
34
|
AuthConfigs,
|
|
35
35
|
} from './resources/auth-configs';
|
|
36
|
-
import { Cli, CliCreateSessionResponse, CliGetSessionParams, CliGetSessionResponse } from './resources/cli';
|
|
37
36
|
import {
|
|
38
37
|
ConnectedAccountCreateParams,
|
|
39
38
|
ConnectedAccountCreateResponse,
|
|
@@ -99,6 +98,14 @@ import {
|
|
|
99
98
|
parseLogLevel,
|
|
100
99
|
} from './internal/utils/log';
|
|
101
100
|
import { isEmptyObj } from './internal/utils/values';
|
|
101
|
+
import {
|
|
102
|
+
Cli,
|
|
103
|
+
CliCreateSessionParams,
|
|
104
|
+
CliCreateSessionResponse,
|
|
105
|
+
CliGetSessionParams,
|
|
106
|
+
CliGetSessionResponse,
|
|
107
|
+
} from './resources/cli/cli';
|
|
108
|
+
import { Logs } from './resources/logs/logs';
|
|
102
109
|
import {
|
|
103
110
|
Mcp,
|
|
104
111
|
McpCreateParams,
|
|
@@ -551,7 +558,7 @@ export class Composio {
|
|
|
551
558
|
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
552
559
|
|
|
553
560
|
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
554
|
-
const errJSON = safeJSON(errText);
|
|
561
|
+
const errJSON = safeJSON(errText) as any;
|
|
555
562
|
const errMessage = errJSON ? undefined : errText;
|
|
556
563
|
|
|
557
564
|
loggerFor(this).debug(
|
|
@@ -592,9 +599,10 @@ export class Composio {
|
|
|
592
599
|
controller: AbortController,
|
|
593
600
|
): Promise<Response> {
|
|
594
601
|
const { signal, method, ...options } = init || {};
|
|
595
|
-
|
|
602
|
+
const abort = this._makeAbort(controller);
|
|
603
|
+
if (signal) signal.addEventListener('abort', abort, { once: true });
|
|
596
604
|
|
|
597
|
-
const timeout = setTimeout(
|
|
605
|
+
const timeout = setTimeout(abort, ms);
|
|
598
606
|
|
|
599
607
|
const isReadableBody =
|
|
600
608
|
((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||
|
|
@@ -761,6 +769,12 @@ export class Composio {
|
|
|
761
769
|
return headers.values;
|
|
762
770
|
}
|
|
763
771
|
|
|
772
|
+
private _makeAbort(controller: AbortController) {
|
|
773
|
+
// note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
|
|
774
|
+
// would capture all request options, and cause a memory leak.
|
|
775
|
+
return () => controller.abort();
|
|
776
|
+
}
|
|
777
|
+
|
|
764
778
|
private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
|
|
765
779
|
bodyHeaders: HeadersLike;
|
|
766
780
|
body: BodyInit | undefined;
|
|
@@ -793,6 +807,14 @@ export class Composio {
|
|
|
793
807
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
794
808
|
) {
|
|
795
809
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
810
|
+
} else if (
|
|
811
|
+
typeof body === 'object' &&
|
|
812
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
813
|
+
) {
|
|
814
|
+
return {
|
|
815
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
816
|
+
body: this.stringifyQuery(body as Record<string, unknown>),
|
|
817
|
+
};
|
|
796
818
|
} else {
|
|
797
819
|
return this.#encoder({ body, headers });
|
|
798
820
|
}
|
|
@@ -829,6 +851,7 @@ export class Composio {
|
|
|
829
851
|
migration: API.Migration = new API.Migration(this);
|
|
830
852
|
cli: API.Cli = new API.Cli(this);
|
|
831
853
|
project: API.Project = new API.Project(this);
|
|
854
|
+
logs: API.Logs = new API.Logs(this);
|
|
832
855
|
toolRouter: API.ToolRouter = new API.ToolRouter(this);
|
|
833
856
|
}
|
|
834
857
|
|
|
@@ -844,6 +867,7 @@ Composio.Files = Files;
|
|
|
844
867
|
Composio.Migration = Migration;
|
|
845
868
|
Composio.Cli = Cli;
|
|
846
869
|
Composio.Project = Project;
|
|
870
|
+
Composio.Logs = Logs;
|
|
847
871
|
Composio.ToolRouter = ToolRouter;
|
|
848
872
|
|
|
849
873
|
export declare namespace Composio {
|
|
@@ -956,11 +980,14 @@ export declare namespace Composio {
|
|
|
956
980
|
Cli as Cli,
|
|
957
981
|
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
958
982
|
type CliGetSessionResponse as CliGetSessionResponse,
|
|
983
|
+
type CliCreateSessionParams as CliCreateSessionParams,
|
|
959
984
|
type CliGetSessionParams as CliGetSessionParams,
|
|
960
985
|
};
|
|
961
986
|
|
|
962
987
|
export { Project as Project };
|
|
963
988
|
|
|
989
|
+
export { Logs as Logs };
|
|
990
|
+
|
|
964
991
|
export {
|
|
965
992
|
ToolRouter as ToolRouter,
|
|
966
993
|
type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse,
|
package/src/internal/parse.ts
CHANGED
|
@@ -29,6 +29,12 @@ export async function defaultParseResponse<T>(client: Composio, props: APIRespon
|
|
|
29
29
|
const mediaType = contentType?.split(';')[0]?.trim();
|
|
30
30
|
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
|
|
31
31
|
if (isJSON) {
|
|
32
|
+
const contentLength = response.headers.get('content-length');
|
|
33
|
+
if (contentLength === '0') {
|
|
34
|
+
// if there is no content we can't do anything
|
|
35
|
+
return undefined as T;
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
const json = await response.json();
|
|
33
39
|
return json as T;
|
|
34
40
|
}
|
|
@@ -7,7 +7,10 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class AuthConfigs extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Creates a new auth config for a toolkit, allowing you to use your own OAuth
|
|
11
|
+
* credentials or API keys instead of Composio-managed authentication. This is
|
|
12
|
+
* required when you want to use custom OAuth apps (bring your own client
|
|
13
|
+
* ID/secret) or configure specific authentication parameters for a toolkit.
|
|
11
14
|
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```ts
|
|
@@ -52,7 +55,10 @@ export class AuthConfigs extends APIResource {
|
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/**
|
|
55
|
-
*
|
|
58
|
+
* Retrieves all auth configs for your project. Auth configs define how users
|
|
59
|
+
* authenticate with external services (OAuth, API keys, etc.). Use filters to find
|
|
60
|
+
* configs for specific toolkits or to distinguish between Composio-managed and
|
|
61
|
+
* custom configurations.
|
|
56
62
|
*
|
|
57
63
|
* @example
|
|
58
64
|
* ```ts
|
|
@@ -194,7 +200,8 @@ export interface AuthConfigRetrieveResponse {
|
|
|
194
200
|
| 'CALCOM_AUTH'
|
|
195
201
|
| 'SERVICE_ACCOUNT'
|
|
196
202
|
| 'SAML'
|
|
197
|
-
| 'DCR_OAUTH'
|
|
203
|
+
| 'DCR_OAUTH'
|
|
204
|
+
| 'S2S_OAUTH2';
|
|
198
205
|
|
|
199
206
|
/**
|
|
200
207
|
* ISO 8601 date-time when the auth config was created
|
|
@@ -389,7 +396,8 @@ export namespace AuthConfigListResponse {
|
|
|
389
396
|
| 'CALCOM_AUTH'
|
|
390
397
|
| 'SERVICE_ACCOUNT'
|
|
391
398
|
| 'SAML'
|
|
392
|
-
| 'DCR_OAUTH'
|
|
399
|
+
| 'DCR_OAUTH'
|
|
400
|
+
| 'S2S_OAUTH2';
|
|
393
401
|
|
|
394
402
|
/**
|
|
395
403
|
* ISO 8601 date-time when the auth config was created
|
|
@@ -594,7 +602,8 @@ export namespace AuthConfigCreateParams {
|
|
|
594
602
|
| 'CALCOM_AUTH'
|
|
595
603
|
| 'SERVICE_ACCOUNT'
|
|
596
604
|
| 'SAML'
|
|
597
|
-
| 'DCR_OAUTH'
|
|
605
|
+
| 'DCR_OAUTH'
|
|
606
|
+
| 'S2S_OAUTH2';
|
|
598
607
|
|
|
599
608
|
type: 'use_custom_auth';
|
|
600
609
|
|
|
@@ -669,6 +678,11 @@ export declare namespace AuthConfigUpdateParams {
|
|
|
669
678
|
*/
|
|
670
679
|
is_enabled_for_tool_router?: boolean;
|
|
671
680
|
|
|
681
|
+
/**
|
|
682
|
+
* The display name of the authentication configuration
|
|
683
|
+
*/
|
|
684
|
+
name?: string;
|
|
685
|
+
|
|
672
686
|
proxy_config?: Variant0.ProxyConfig | null;
|
|
673
687
|
|
|
674
688
|
/**
|
|
@@ -729,6 +743,11 @@ export declare namespace AuthConfigUpdateParams {
|
|
|
729
743
|
*/
|
|
730
744
|
is_enabled_for_tool_router?: boolean;
|
|
731
745
|
|
|
746
|
+
/**
|
|
747
|
+
* The display name of the authentication configuration
|
|
748
|
+
*/
|
|
749
|
+
name?: string;
|
|
750
|
+
|
|
732
751
|
/**
|
|
733
752
|
* @deprecated Use tool_access_config instead. This field will be deprecated in the
|
|
734
753
|
* future.
|