@composio/client 2.0.0-rc.2 → 2.0.0-rc.4
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 +32 -0
- package/dist/{api-key-revocation-BqiqlJh6.mjs → api-key-revocation-Cbokr5zZ.mjs} +4 -3
- package/dist/{auth-ClFXmN5T.mjs → auth-CNDyZgjw.mjs} +1 -1
- package/dist/{auth-configs-COkEdwlP.mjs → auth-configs-4u-8I2K7.mjs} +17 -11
- package/dist/{clanker-1ptspWLR.mjs → clanker-D6FjS8Lj.mjs} +4 -3
- package/dist/{cli-BWTXVRT4.mjs → cli-LIRIGe7k.mjs} +11 -8
- package/dist/{client-D5v0_f-k.d.mts → client-ByIYmMzt.d.mts} +30 -2
- package/dist/{connected-accounts-DK24qYIM.mjs → connected-accounts-Bqtl42g0.mjs} +23 -15
- package/dist/{consumer-Do3lg_vI.mjs → consumer-BauHsJXO.mjs} +5 -4
- package/dist/{custom-CH7n4Dyd.mjs → custom-CGqEBUWj.mjs} +4 -3
- package/dist/{files-DoNtYu2Q.mjs → files-BYEsIET1.mjs} +7 -5
- package/dist/{files-lfGzAnJ_.mjs → files-DkH2-irQ.mjs} +13 -9
- package/dist/{generate-B7ClqhN0.mjs → generate-DTodgjHD.mjs} +4 -3
- package/dist/{request-zLX87M09.mjs → generated-operations-WtSYnmW0.mjs} +843 -16
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +127 -800
- package/dist/{link-NsFv9L3R.mjs → link-DL53IiYh.mjs} +4 -3
- package/dist/{logs-BhCTVSZE.mjs → logs-DPgNkEde.mjs} +8 -6
- package/dist/{manage-7vQYn-gu.mjs → manage-DDmuMlFb.mjs} +6 -4
- package/dist/mcp-CS9s4sDK.mjs +82 -0
- package/dist/{org-C12wx9QM.mjs → org-9gTqtmtc.mjs} +9 -8
- package/dist/{owner-D4ghEkrK.mjs → owner-EZzWtfQx.mjs} +1 -1
- package/dist/{project-By-OBe-4.mjs → project-4Ol46ZwD.mjs} +4 -3
- package/dist/project-CKmDHyu_.mjs +47 -0
- package/dist/{project-DgdqyoZJ.mjs → project-DeRwedA-.mjs} +1 -1
- package/dist/{project-Cnr9eceg.mjs → project-uN9dGkls.mjs} +4 -3
- package/dist/realtime-C8DEUgai.mjs +28 -0
- 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/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/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/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-CmqSfXtq.mjs → session-DWQaRfV_.mjs} +39 -26
- package/dist/{session-Ci0MoTTn.mjs → session-EJK1YmKD.mjs} +3 -2
- package/dist/{tool-router-DbmIxiU5.mjs → tool-router-CqRP0_gv.mjs} +1 -1
- package/dist/toolkits-B3eGuBu0.mjs +48 -0
- package/dist/tools-B4uip2mE.mjs +33 -0
- package/dist/{tools-BO1wTIiE.mjs → tools-fb-vXe-l.mjs} +21 -14
- package/dist/{trigger-instances-CoEohjcv.mjs → trigger-instances-BCL5DJ0o.mjs} +8 -6
- package/dist/{triggers-BwsETpsM.mjs → triggers-DnDhI69h.mjs} +6 -4
- package/dist/triggers-types-HHDB0mLH.mjs +34 -0
- package/dist/{usage-D6ahTV_Y.mjs → usage-B6vtknow.mjs} +7 -5
- package/dist/{usage-BJsJ4nsd.mjs → usage-CzAfsIc4.mjs} +7 -5
- package/dist/{webhook-endpoints-CyWYVPMe.mjs → webhook-endpoints-DRJgQ6s0.mjs} +15 -10
- package/dist/webhook-subscriptions-WcdnIkGU.mjs +55 -0
- package/package.json +3 -1
- package/dist/mcp-r-SWyCDh.mjs +0 -73
- package/dist/project-DzrdSIis.mjs +0 -42
- package/dist/realtime-DHJnO2Ye.mjs +0 -26
- package/dist/toolkits-BUWB3p_C.mjs +0 -43
- package/dist/tools-B4kHPHbe.mjs +0 -30
- package/dist/triggers-types-DmOurxxx.mjs +0 -31
- package/dist/webhook-subscriptions-BgnCTUGn.mjs +0 -48
package/dist/mcp-r-SWyCDh.mjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
import { t as Custom } from "./custom-CH7n4Dyd.mjs";
|
|
3
|
-
import { t as Generate } from "./generate-B7ClqhN0.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/compat/resources/mcp/mcp.ts
|
|
6
|
-
/**
|
|
7
|
-
* Stainless-shaped `client.mcp` resource: the 6-method published surface of
|
|
8
|
-
* `@composio/client` (create/retrieve/update/list/delete/retrieveApp) plus the
|
|
9
|
-
* spec-surface `/mcp/servers/{serverId}/instances` trio (listInstances/
|
|
10
|
-
* createInstance/deleteInstance), never published by Stainless — wayfinder
|
|
11
|
-
* ticket 29. Dispatched through the handwritten kernel.
|
|
12
|
-
*/
|
|
13
|
-
var Mcp = class {
|
|
14
|
-
custom;
|
|
15
|
-
generate;
|
|
16
|
-
#client;
|
|
17
|
-
constructor(client) {
|
|
18
|
-
this.#client = client;
|
|
19
|
-
this.custom = new Custom(client);
|
|
20
|
-
this.generate = new Generate(client);
|
|
21
|
-
}
|
|
22
|
-
create(body, options) {
|
|
23
|
-
return this.#client.post(path`/api/v3.1/mcp/servers`, {
|
|
24
|
-
body,
|
|
25
|
-
...options
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
retrieve(id, options) {
|
|
29
|
-
return this.#client.get(path`/api/v3.1/mcp/${id}`, { ...options });
|
|
30
|
-
}
|
|
31
|
-
update(id, body = {}, options) {
|
|
32
|
-
return this.#client.patch(path`/api/v3.1/mcp/${id}`, {
|
|
33
|
-
body,
|
|
34
|
-
...options
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
list(query = {}, options) {
|
|
38
|
-
return this.#client.get(path`/api/v3.1/mcp/servers`, {
|
|
39
|
-
query,
|
|
40
|
-
...options
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
delete(id, options) {
|
|
44
|
-
return this.#client.delete(path`/api/v3.1/mcp/${id}`, { ...options });
|
|
45
|
-
}
|
|
46
|
-
createInstance(serverID, body, options) {
|
|
47
|
-
return this.#client.post(path`/api/v3.1/mcp/servers/${serverID}/instances`, {
|
|
48
|
-
body,
|
|
49
|
-
...options
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
deleteInstance(instanceID, params, options) {
|
|
53
|
-
const { serverId } = params;
|
|
54
|
-
return this.#client.delete(path`/api/v3.1/mcp/servers/${serverId}/instances/${instanceID}`, { ...options });
|
|
55
|
-
}
|
|
56
|
-
listInstances(serverID, query = {}, options) {
|
|
57
|
-
return this.#client.get(path`/api/v3.1/mcp/servers/${serverID}/instances`, {
|
|
58
|
-
query,
|
|
59
|
-
...options
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
retrieveApp(appKey, query = {}, options) {
|
|
63
|
-
return this.#client.get(path`/api/v3.1/mcp/app/${appKey}`, {
|
|
64
|
-
query,
|
|
65
|
-
...options
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
Mcp.Custom = Custom;
|
|
70
|
-
Mcp.Generate = Generate;
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
export { Mcp as t };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/resources/org/owner/project.ts
|
|
4
|
-
/**
|
|
5
|
-
* Spec-surface `client.org.owner.project` resource: the 5-method owner-scoped
|
|
6
|
-
* project surface of the v3.1 spec (create/list/retrieve/delete/
|
|
7
|
-
* regenerateAPIKey over `/org/owner/project/*`), never published by
|
|
8
|
-
* Stainless — wayfinder ticket 31.
|
|
9
|
-
*/
|
|
10
|
-
var Project = class {
|
|
11
|
-
#client;
|
|
12
|
-
constructor(client) {
|
|
13
|
-
this.#client = client;
|
|
14
|
-
}
|
|
15
|
-
create(body, options) {
|
|
16
|
-
return this.#client.post(path`/api/v3.1/org/owner/project/new`, {
|
|
17
|
-
body,
|
|
18
|
-
...options
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
retrieve(nanoID, options) {
|
|
22
|
-
return this.#client.get(path`/api/v3.1/org/owner/project/${nanoID}`, { ...options });
|
|
23
|
-
}
|
|
24
|
-
list(query = {}, options) {
|
|
25
|
-
return this.#client.get(path`/api/v3.1/org/owner/project/list`, {
|
|
26
|
-
query,
|
|
27
|
-
...options
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
delete(nanoID, query = {}, options) {
|
|
31
|
-
return this.#client.delete(path`/api/v3.1/org/owner/project/${nanoID}`, {
|
|
32
|
-
query,
|
|
33
|
-
...options
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
regenerateAPIKey(nanoID, options) {
|
|
37
|
-
return this.#client.post(path`/api/v3.1/org/owner/project/${nanoID}/regenerate_api_key`, { ...options });
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { Project as t };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/resources/cli/realtime.ts
|
|
4
|
-
/**
|
|
5
|
-
* Stainless-shaped `client.cli.realtime` resource: the 2-method Pusher
|
|
6
|
-
* realtime sub-surface of `@composio/client` (auth/credentials on
|
|
7
|
-
* `/cli/realtime/*`).
|
|
8
|
-
*/
|
|
9
|
-
var Realtime = class {
|
|
10
|
-
#client;
|
|
11
|
-
constructor(client) {
|
|
12
|
-
this.#client = client;
|
|
13
|
-
}
|
|
14
|
-
auth(body, options) {
|
|
15
|
-
return this.#client.post(path`/api/v3.1/cli/realtime/auth`, {
|
|
16
|
-
body,
|
|
17
|
-
...options
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
credentials(options) {
|
|
21
|
-
return this.#client.get(path`/api/v3.1/cli/realtime/credentials`, { ...options });
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
export { Realtime as t };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/resources/toolkits.ts
|
|
4
|
-
/**
|
|
5
|
-
* Stainless-shaped `client.toolkits` resource: the 3-method published surface
|
|
6
|
-
* of `@composio/client` (retrieve/list/retrieveCategories) plus the
|
|
7
|
-
* spec-surface `retrieveMulti` (`POST /toolkits/multi`) and
|
|
8
|
-
* `retrieveChangelog` (`GET /toolkits/changelog`), never published by
|
|
9
|
-
* Stainless — wayfinder ticket 29.
|
|
10
|
-
*/
|
|
11
|
-
var Toolkits = class {
|
|
12
|
-
#client;
|
|
13
|
-
constructor(client) {
|
|
14
|
-
this.#client = client;
|
|
15
|
-
}
|
|
16
|
-
retrieve(slug, query = {}, options) {
|
|
17
|
-
return this.#client.get(path`/api/v3.1/toolkits/${slug}`, {
|
|
18
|
-
query,
|
|
19
|
-
...options
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
list(query = {}, options) {
|
|
23
|
-
return this.#client.get(path`/api/v3.1/toolkits`, {
|
|
24
|
-
query,
|
|
25
|
-
...options
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
retrieveCategories(options) {
|
|
29
|
-
return this.#client.get(path`/api/v3.1/toolkits/categories`, { ...options });
|
|
30
|
-
}
|
|
31
|
-
retrieveChangelog(options) {
|
|
32
|
-
return this.#client.get(path`/api/v3.1/toolkits/changelog`, { ...options });
|
|
33
|
-
}
|
|
34
|
-
retrieveMulti(body = {}, options) {
|
|
35
|
-
return this.#client.post(path`/api/v3.1/toolkits/multi`, {
|
|
36
|
-
body,
|
|
37
|
-
...options
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { Toolkits as t };
|
package/dist/tools-B4kHPHbe.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/resources/logs/tools.ts
|
|
4
|
-
/**
|
|
5
|
-
* Stainless-shaped `client.logs.tools` resource plus the deprecated
|
|
6
|
-
* spec-surface `listFields` method: tool-execution log retrieval/listing and
|
|
7
|
-
* field metadata over `internal/action_execution/*`.
|
|
8
|
-
*/
|
|
9
|
-
var Tools = class {
|
|
10
|
-
#client;
|
|
11
|
-
constructor(client) {
|
|
12
|
-
this.#client = client;
|
|
13
|
-
}
|
|
14
|
-
retrieve(id, options) {
|
|
15
|
-
return this.#client.get(path`/api/v3.1/internal/action_execution/log/${id}`, { ...options });
|
|
16
|
-
}
|
|
17
|
-
list(body, options) {
|
|
18
|
-
return this.#client.post(path`/api/v3.1/internal/action_execution/logs`, {
|
|
19
|
-
body,
|
|
20
|
-
...options
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
24
|
-
listFields(options) {
|
|
25
|
-
return this.#client.get(path`/api/v3.1/internal/action_execution/fields`, { ...options });
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { Tools as t };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/resources/triggers-types.ts
|
|
4
|
-
/**
|
|
5
|
-
* Stainless-shaped `client.triggersTypes` resource: the exact 3-method surface
|
|
6
|
-
* of `@composio/client` (retrieve/list/retrieveEnum).
|
|
7
|
-
*/
|
|
8
|
-
var TriggersTypes = class {
|
|
9
|
-
#client;
|
|
10
|
-
constructor(client) {
|
|
11
|
-
this.#client = client;
|
|
12
|
-
}
|
|
13
|
-
retrieve(slug, query = {}, options) {
|
|
14
|
-
return this.#client.get(path`/api/v3.1/triggers_types/${slug}`, {
|
|
15
|
-
query,
|
|
16
|
-
...options
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
list(query = {}, options) {
|
|
20
|
-
return this.#client.get(path`/api/v3.1/triggers_types`, {
|
|
21
|
-
query,
|
|
22
|
-
...options
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
retrieveEnum(options) {
|
|
26
|
-
return this.#client.get(path`/api/v3.1/triggers_types/list/enum`, { ...options });
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { TriggersTypes as t };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/compat/resources/webhook-subscriptions.ts
|
|
4
|
-
/**
|
|
5
|
-
* Spec-surface `client.webhookSubscriptions` resource: the 7-method
|
|
6
|
-
* `/webhook_subscriptions` surface of the v3.1 spec
|
|
7
|
-
* (create/list/retrieve/update/delete/rotateSecret/listEventTypes), never
|
|
8
|
-
* published by Stainless — wayfinder ticket 30.
|
|
9
|
-
*/
|
|
10
|
-
var WebhookSubscriptions = class {
|
|
11
|
-
#client;
|
|
12
|
-
constructor(client) {
|
|
13
|
-
this.#client = client;
|
|
14
|
-
}
|
|
15
|
-
create(body, options) {
|
|
16
|
-
return this.#client.post(path`/api/v3.1/webhook_subscriptions`, {
|
|
17
|
-
body,
|
|
18
|
-
...options
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
retrieve(id, options) {
|
|
22
|
-
return this.#client.get(path`/api/v3.1/webhook_subscriptions/${id}`, { ...options });
|
|
23
|
-
}
|
|
24
|
-
update(id, body = {}, options) {
|
|
25
|
-
return this.#client.patch(path`/api/v3.1/webhook_subscriptions/${id}`, {
|
|
26
|
-
body,
|
|
27
|
-
...options
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
list(query = {}, options) {
|
|
31
|
-
return this.#client.get(path`/api/v3.1/webhook_subscriptions`, {
|
|
32
|
-
query,
|
|
33
|
-
...options
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
delete(id, options) {
|
|
37
|
-
return this.#client.delete(path`/api/v3.1/webhook_subscriptions/${id}`, { ...options });
|
|
38
|
-
}
|
|
39
|
-
listEventTypes(options) {
|
|
40
|
-
return this.#client.get(path`/api/v3.1/webhook_subscriptions/event_types`, { ...options });
|
|
41
|
-
}
|
|
42
|
-
rotateSecret(id, options) {
|
|
43
|
-
return this.#client.post(path`/api/v3.1/webhook_subscriptions/${id}/rotate_secret`, { ...options });
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
export { WebhookSubscriptions as t };
|