@composio/client 2.0.0-rc.14 → 2.0.0-rc.16
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/README.md +28 -6
- package/dist/{api-key-revocation-BtpYMp2A.mjs → api-key-revocation-CvGpd3Rw.mjs} +1 -1
- package/dist/{auth-DOLhepVW.mjs → auth-C0IYTv5D.mjs} +1 -1
- package/dist/{auth-configs-DwRyrT5R.mjs → auth-configs-COmbnKYx.mjs} +1 -1
- package/dist/{clanker-CKQuvB-f.mjs → clanker-hE4FKPjg.mjs} +1 -1
- package/dist/{cli-r2AP1DQC.mjs → cli-CuFaxvp4.mjs} +2 -2
- package/dist/{connected-accounts-DoC-z2wg.mjs → connected-accounts-BmbcAhdS.mjs} +1 -1
- package/dist/{consumer-qY1RmyT2.mjs → consumer-BaJgJBXQ.mjs} +2 -2
- package/dist/{custom-0lCWqNaG.mjs → custom-DIJbIQGR.mjs} +1 -1
- package/dist/custom-DbEv7dUC.mjs +34 -0
- package/dist/effect.d.mts +13 -6
- package/dist/effect.mjs +23 -8
- package/dist/{files-DNgrvsvD.mjs → files-Cw6ulQZy.mjs} +1 -1
- package/dist/{files-Bn4CgdQ5.mjs → files-RPz_Fvnz.mjs} +1 -1
- package/dist/{generate-gTgUCYef.mjs → generate-DZXuXtYM.mjs} +1 -1
- package/dist/{generated-deprecated-inputs-ZjzVSweS.mjs → generated-deprecated-inputs-B6o8D8ub.mjs} +1 -1
- package/dist/{generated-operations-D8jOXj9j.mjs → generated-operations-DrhN6W_k.mjs} +43 -8
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +27 -63
- package/dist/{keyring-Bdurkv-I.mjs → keyring-CmnkWH5K.mjs} +1 -1
- package/dist/{link-DhTr_Zq5.mjs → link-C0KzTJBI.mjs} +1 -1
- package/dist/{logs-BCI69MYO.mjs → logs-Bj5MAt8z.mjs} +3 -3
- package/dist/{manage-nrsf5m2K.mjs → manage-DDFmGWNH.mjs} +1 -1
- package/dist/{mcp-Cf7Tp8i8.mjs → mcp-DXmBAF09.mjs} +3 -3
- package/dist/{org-_aj_XBWC.mjs → org-D4J-n07N.mjs} +6 -6
- package/dist/{owner-C3FsQfkM.mjs → owner-CfjgcAcM.mjs} +1 -1
- package/dist/{project-VByEH_fg.mjs → project-7LL6W_tc.mjs} +1 -1
- package/dist/{project-D08liXQJ.mjs → project-CLrBv6tJ.mjs} +1 -1
- package/dist/{project-C0XrovoG.mjs → project-CnOrdnOM.mjs} +1 -1
- package/dist/{project-hVzPq3ta.mjs → project-Dw9JLelr.mjs} +1 -1
- package/dist/{realtime-w-jWkaTI.mjs → realtime-DQ_gT0q7.mjs} +1 -1
- package/dist/resources/api-key-revocation.d.mts +1 -1
- package/dist/resources/api-key-revocation.mjs +1 -1
- package/dist/resources/auth/auth.d.mts +1 -1
- package/dist/resources/auth/auth.mjs +1 -1
- package/dist/resources/auth/index.d.mts +1 -1
- package/dist/resources/auth/index.mjs +2 -2
- package/dist/resources/auth/session.d.mts +1 -1
- package/dist/resources/auth/session.mjs +1 -1
- package/dist/resources/auth-configs.d.mts +1 -1
- package/dist/resources/auth-configs.mjs +1 -1
- package/dist/resources/auth.d.mts +1 -1
- package/dist/resources/auth.mjs +2 -2
- package/dist/resources/cli/cli.d.mts +1 -1
- package/dist/resources/cli/cli.mjs +1 -1
- package/dist/resources/cli/index.d.mts +1 -1
- package/dist/resources/cli/index.mjs +2 -2
- package/dist/resources/cli/realtime.d.mts +1 -1
- package/dist/resources/cli/realtime.mjs +1 -1
- package/dist/resources/cli.d.mts +1 -1
- package/dist/resources/cli.mjs +2 -2
- package/dist/resources/connected-accounts.d.mts +1 -1
- package/dist/resources/connected-accounts.mjs +1 -1
- package/dist/resources/custom.d.mts +1 -1
- package/dist/resources/custom.mjs +1 -1
- package/dist/resources/files.d.mts +1 -1
- package/dist/resources/files.mjs +1 -1
- package/dist/resources/index.d.mts +1 -1
- package/dist/resources/index.mjs +13 -13
- package/dist/resources/keyring.d.mts +1 -1
- package/dist/resources/keyring.mjs +1 -1
- package/dist/resources/link.d.mts +1 -1
- package/dist/resources/link.mjs +1 -1
- package/dist/resources/logs/index.d.mts +1 -1
- package/dist/resources/logs/index.mjs +3 -3
- package/dist/resources/logs/logs.d.mts +1 -1
- package/dist/resources/logs/logs.mjs +1 -1
- package/dist/resources/logs/tools.d.mts +1 -1
- package/dist/resources/logs/tools.mjs +1 -1
- package/dist/resources/logs/triggers.d.mts +1 -1
- package/dist/resources/logs/triggers.mjs +1 -1
- package/dist/resources/logs.d.mts +1 -1
- package/dist/resources/logs.mjs +3 -3
- package/dist/resources/mcp/custom.d.mts +1 -1
- package/dist/resources/mcp/custom.mjs +1 -1
- package/dist/resources/mcp/generate.d.mts +1 -1
- package/dist/resources/mcp/generate.mjs +1 -1
- package/dist/resources/mcp/index.d.mts +1 -1
- package/dist/resources/mcp/index.mjs +3 -3
- package/dist/resources/mcp/mcp.d.mts +1 -1
- package/dist/resources/mcp/mcp.mjs +1 -1
- package/dist/resources/mcp.d.mts +1 -1
- package/dist/resources/mcp.mjs +3 -3
- package/dist/resources/org/clanker.d.mts +1 -1
- package/dist/resources/org/clanker.mjs +1 -1
- package/dist/resources/org/consumer/consumer.d.mts +1 -1
- package/dist/resources/org/consumer/consumer.mjs +1 -1
- package/dist/resources/org/consumer/index.d.mts +1 -1
- package/dist/resources/org/consumer/index.mjs +2 -2
- package/dist/resources/org/consumer/project.d.mts +1 -1
- package/dist/resources/org/consumer/project.mjs +1 -1
- package/dist/resources/org/consumer.d.mts +1 -1
- package/dist/resources/org/consumer.mjs +2 -2
- package/dist/resources/org/index.d.mts +1 -1
- package/dist/resources/org/index.mjs +6 -6
- package/dist/resources/org/org.d.mts +1 -1
- package/dist/resources/org/org.mjs +1 -1
- package/dist/resources/org/owner/index.d.mts +1 -1
- package/dist/resources/org/owner/index.mjs +2 -2
- package/dist/resources/org/owner/owner.d.mts +1 -1
- package/dist/resources/org/owner/owner.mjs +1 -1
- package/dist/resources/org/owner/project.d.mts +1 -1
- package/dist/resources/org/owner/project.mjs +1 -1
- package/dist/resources/org/owner.d.mts +1 -1
- package/dist/resources/org/owner.mjs +2 -2
- package/dist/resources/org/project.d.mts +1 -1
- package/dist/resources/org/project.mjs +1 -1
- package/dist/resources/org/usage.d.mts +1 -1
- package/dist/resources/org/usage.mjs +1 -1
- package/dist/resources/org.d.mts +1 -1
- package/dist/resources/org.mjs +6 -6
- package/dist/resources/project/index.d.mts +1 -1
- package/dist/resources/project/index.mjs +1 -1
- package/dist/resources/project/project.d.mts +1 -1
- package/dist/resources/project/project.mjs +1 -1
- package/dist/resources/project/usage.d.mts +1 -1
- package/dist/resources/project/usage.mjs +1 -1
- package/dist/resources/project.d.mts +1 -1
- package/dist/resources/project.mjs +1 -1
- package/dist/resources/session-configs.d.mts +1 -1
- package/dist/resources/session-configs.mjs +1 -1
- package/dist/resources/tool-router/index.d.mts +1 -1
- package/dist/resources/tool-router/index.mjs +2 -2
- package/dist/resources/tool-router/session/files.d.mts +1 -1
- package/dist/resources/tool-router/session/files.mjs +1 -1
- package/dist/resources/tool-router/session/index.d.mts +1 -1
- package/dist/resources/tool-router/session/index.mjs +2 -2
- package/dist/resources/tool-router/session/session.d.mts +1 -1
- package/dist/resources/tool-router/session/session.mjs +1 -1
- package/dist/resources/tool-router/session.d.mts +1 -1
- package/dist/resources/tool-router/session.mjs +2 -2
- package/dist/resources/tool-router/tool-router.d.mts +1 -1
- package/dist/resources/tool-router/tool-router.mjs +1 -1
- package/dist/resources/tool-router.d.mts +1 -1
- package/dist/resources/tool-router.mjs +2 -2
- package/dist/resources/toolkits.d.mts +1 -1
- package/dist/resources/toolkits.mjs +1 -1
- package/dist/resources/tools.d.mts +1 -1
- package/dist/resources/tools.mjs +1 -1
- package/dist/resources/trigger-instances/index.d.mts +1 -1
- package/dist/resources/trigger-instances/index.mjs +2 -2
- package/dist/resources/trigger-instances/manage.d.mts +1 -1
- package/dist/resources/trigger-instances/manage.mjs +1 -1
- package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
- package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
- package/dist/resources/trigger-instances.d.mts +1 -1
- package/dist/resources/trigger-instances.mjs +2 -2
- package/dist/resources/triggers-types.d.mts +1 -1
- package/dist/resources/triggers-types.mjs +1 -1
- package/dist/resources/webhook-endpoints.d.mts +1 -1
- package/dist/resources/webhook-endpoints.mjs +1 -1
- package/dist/resources/webhook-subscriptions.d.mts +1 -1
- package/dist/resources/webhook-subscriptions.mjs +1 -1
- package/dist/{session-DpNSa-W_.mjs → session-Bmbv2Y2h.mjs} +2 -2
- package/dist/{session-DkmLw9W7.mjs → session-CtO_BX-m.mjs} +1 -1
- package/dist/{session-configs-CtHZk-vG.d.mts → session-configs-C_A0gUf5.d.mts} +7 -15
- package/dist/{tool-router-BS_br3iE.mjs → tool-router-BICZScC1.mjs} +1 -1
- package/dist/{toolkits-BPFKa015.mjs → toolkits-Cj8oNvQi.mjs} +1 -1
- package/dist/{tools-CrBz2Tm7.mjs → tools-BiyVpJSA.mjs} +1 -1
- package/dist/{tools-BwrEpHGs.mjs → tools-C-2Nsm32.mjs} +1 -1
- package/dist/{trigger-instances-DyFxjnmc.mjs → trigger-instances-0GIUz_qu.mjs} +2 -2
- package/dist/{triggers-BKDJTu8N.mjs → triggers-DWnL3gjv.mjs} +1 -1
- package/dist/{triggers-types-CAnS6vg7.mjs → triggers-types-BkigxzlE.mjs} +1 -1
- package/dist/{usage-Dj3PPjwF.mjs → usage-D9XlIZBX.mjs} +1 -1
- package/dist/{usage-BS1Ecjh5.mjs → usage-RRYqkjLH.mjs} +1 -1
- package/dist/version-BkHUhokz.d.mts +4 -0
- package/dist/{webhook-endpoints-DE_mR76r.mjs → webhook-endpoints-x3UiV7uH.mjs} +1 -1
- package/dist/{webhook-subscriptions-DWY9Bf_H.mjs → webhook-subscriptions-_7MTwe1s.mjs} +1 -1
- package/package.json +4 -3
- package/dist/custom-Bnoa7Qsa.mjs +0 -88
- package/dist/version-DrOZXX3G.d.mts +0 -4
package/dist/custom-Bnoa7Qsa.mjs
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-D8jOXj9j.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/legacy-options.ts
|
|
4
|
-
/**
|
|
5
|
-
* Recognizing a request-options bag passed where a params object now goes.
|
|
6
|
-
*
|
|
7
|
-
* TODO(#66): a migration guardrail, to be removed before stable 2.0 —
|
|
8
|
-
* https://github.com/ComposioHQ/composio-client/issues/66.
|
|
9
|
-
*
|
|
10
|
-
* A method that gains its first optional parameter moves from
|
|
11
|
-
* `method(id, options?)` to `method(id, params?, options?)`. A caller written
|
|
12
|
-
* against the released two-position form then hands its options to the params
|
|
13
|
-
* position, where `headers` is serialized into the URL and `timeout`/`signal`
|
|
14
|
-
* are dropped. The generator emits a check for exactly the methods its ledger
|
|
15
|
-
* declares (`LEGACY_OPTIONS_POSITIONS` in `packages/codegen`), and every one of
|
|
16
|
-
* them asks this module — the key set lives here once, not in generated files.
|
|
17
|
-
*
|
|
18
|
-
* This file imports nothing on purpose: the generator reads
|
|
19
|
-
* `REQUEST_OPTIONS_KEYS` to refuse a ledger entry whose parameter names collide
|
|
20
|
-
* with it, and must be able to load the list without the rest of the kernel.
|
|
21
|
-
* `test/types/legacy-options.test-d.ts` pins the list to `keyof RequestOptions`
|
|
22
|
-
* in both directions, so a key added to that interface cannot be forgotten here.
|
|
23
|
-
*/
|
|
24
|
-
/** Every key of `RequestOptions` (`request.ts`). */
|
|
25
|
-
const REQUEST_OPTIONS_KEYS = [
|
|
26
|
-
"headers",
|
|
27
|
-
"maxRetries",
|
|
28
|
-
"timeout",
|
|
29
|
-
"signal",
|
|
30
|
-
"fetchOptions",
|
|
31
|
-
"idempotencyKey"
|
|
32
|
-
];
|
|
33
|
-
/**
|
|
34
|
-
* Whether `value`, received in a params position, is really a request-options
|
|
35
|
-
* bag from a call written against the released two-position signature.
|
|
36
|
-
*
|
|
37
|
-
* `declaredKeys` are the operation's own parameter names. An object carrying
|
|
38
|
-
* any of them is params, whatever else it carries: a mixed object is ambiguous,
|
|
39
|
-
* and reading it as options would silently discard a parameter the caller set.
|
|
40
|
-
* Otherwise it is options only on positive evidence — at least one
|
|
41
|
-
* `RequestOptions` key — so `{}`, `null` and `undefined` stay params.
|
|
42
|
-
*
|
|
43
|
-
* The generator guarantees the two key sets are disjoint, which is what makes
|
|
44
|
-
* the answer unambiguous for every object that is not mixed.
|
|
45
|
-
*/
|
|
46
|
-
const isLegacyRequestOptions = (value, declaredKeys) => {
|
|
47
|
-
if (typeof value !== "object" || value === null) return false;
|
|
48
|
-
if (declaredKeys.some((key) => Object.hasOwn(value, key))) return false;
|
|
49
|
-
return REQUEST_OPTIONS_KEYS.some((key) => Object.hasOwn(value, key));
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/compat/resources/custom.ts
|
|
54
|
-
const OP_DELETE_TOOLKIT = generatedOperation("custom.deleteToolkit");
|
|
55
|
-
const OP_SYNC = generatedOperation("custom.sync");
|
|
56
|
-
const OP_UPSERT = generatedOperation("custom.upsert");
|
|
57
|
-
const LEGACY_PARAM_KEYS_DELETE_TOOLKIT = ["revoke_on_delete"];
|
|
58
|
-
/** OpenAPI resource for `custom`. */
|
|
59
|
-
var Custom = class {
|
|
60
|
-
#client;
|
|
61
|
-
constructor(client) {
|
|
62
|
-
this.#client = client;
|
|
63
|
-
}
|
|
64
|
-
deleteToolkit(slug, queryOrOptions = {}, trailingOptions) {
|
|
65
|
-
const optionsSecond = trailingOptions === void 0 && isLegacyRequestOptions(queryOrOptions, LEGACY_PARAM_KEYS_DELETE_TOOLKIT);
|
|
66
|
-
const query = optionsSecond ? {} : queryOrOptions;
|
|
67
|
-
const options = optionsSecond ? queryOrOptions : trailingOptions;
|
|
68
|
-
return this.#client.delete(path`/api/v3.1/custom/toolkits/${slug}`, withOperation(OP_DELETE_TOOLKIT, {
|
|
69
|
-
query,
|
|
70
|
-
...options
|
|
71
|
-
}));
|
|
72
|
-
}
|
|
73
|
-
sync(body, options) {
|
|
74
|
-
return this.#client.post("/api/v3.1/custom/toolkits/sync", withOperation(OP_SYNC, {
|
|
75
|
-
body,
|
|
76
|
-
...options
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
upsert(body, options) {
|
|
80
|
-
return this.#client.post("/api/v3.1/custom/toolkits/upsert", withOperation(OP_UPSERT, {
|
|
81
|
-
body,
|
|
82
|
-
...options
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
//#endregion
|
|
88
|
-
export { Custom as t };
|