@composio/client 0.1.0-alpha.36 → 0.1.0-alpha.38
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 +64 -0
- package/client.d.mts +11 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -14
- package/client.d.ts.map +1 -1
- package/client.js +3 -6
- package/client.js.map +1 -1
- package/client.mjs +5 -8
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/internal/utils/values.js +3 -3
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +3 -3
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +10 -4
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +10 -4
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/cli.d.mts +1 -76
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -76
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +0 -28
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +0 -28
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +478 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +478 -4
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/files.d.mts +1 -1
- package/resources/files.d.ts +1 -1
- package/resources/index.d.mts +5 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/link.d.mts +1562 -81
- package/resources/link.d.mts.map +1 -1
- package/resources/link.d.ts +1562 -81
- package/resources/link.d.ts.map +1 -1
- package/resources/link.js +0 -13
- package/resources/link.js.map +1 -1
- package/resources/link.mjs +0 -13
- package/resources/link.mjs.map +1 -1
- package/resources/mcp/index.d.mts +1 -1
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +1 -1
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +1 -95
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +1 -95
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +0 -22
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +0 -22
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/tool-router.d.mts +87 -0
- package/resources/tool-router.d.mts.map +1 -0
- package/resources/tool-router.d.ts +87 -0
- package/resources/tool-router.d.ts.map +1 -0
- package/resources/tool-router.js +38 -0
- package/resources/tool-router.js.map +1 -0
- package/resources/tool-router.mjs +34 -0
- package/resources/tool-router.mjs.map +1 -0
- package/resources/toolkits.d.mts +21 -3
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +21 -3
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +2 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +2 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +87 -7
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +87 -7
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/index.d.mts +0 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +0 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js +1 -3
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs +0 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +1 -5
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +1 -5
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +0 -4
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +0 -4
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +11 -2
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +11 -2
- package/resources/triggers-types.d.ts.map +1 -1
- package/src/client.ts +16 -46
- package/src/internal/to-file.ts +1 -1
- package/src/internal/utils/values.ts +3 -3
- package/src/resources/auth-configs.ts +11 -4
- package/src/resources/cli.ts +0 -89
- package/src/resources/connected-accounts.ts +975 -63
- package/src/resources/files.ts +1 -1
- package/src/resources/index.ts +6 -19
- package/src/resources/link.ts +3001 -112
- package/src/resources/mcp/index.ts +0 -2
- package/src/resources/mcp/mcp.ts +0 -123
- package/src/resources/tool-router.ts +107 -0
- package/src/resources/toolkits.ts +30 -3
- package/src/resources/tools.ts +149 -7
- package/src/resources/trigger-instances/index.ts +0 -7
- package/src/resources/trigger-instances/trigger-instances.ts +1 -19
- package/src/resources/triggers-types.ts +13 -2
- 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/org/api-key.d.mts +0 -44
- package/resources/org/api-key.d.mts.map +0 -1
- package/resources/org/api-key.d.ts +0 -44
- package/resources/org/api-key.d.ts.map +0 -1
- package/resources/org/api-key.js +0 -34
- package/resources/org/api-key.js.map +0 -1
- package/resources/org/api-key.mjs +0 -30
- package/resources/org/api-key.mjs.map +0 -1
- package/resources/org/index.d.mts +0 -4
- package/resources/org/index.d.mts.map +0 -1
- package/resources/org/index.d.ts +0 -4
- package/resources/org/index.d.ts.map +0 -1
- package/resources/org/index.js +0 -11
- package/resources/org/index.js.map +0 -1
- package/resources/org/index.mjs +0 -5
- package/resources/org/index.mjs.map +0 -1
- package/resources/org/org.d.mts +0 -14
- package/resources/org/org.d.mts.map +0 -1
- package/resources/org/org.d.ts +0 -14
- package/resources/org/org.d.ts.map +0 -1
- package/resources/org/org.js +0 -21
- package/resources/org/org.js.map +0 -1
- package/resources/org/org.mjs +0 -16
- package/resources/org/org.mjs.map +0 -1
- package/resources/org/project/api-keys.d.mts +0 -142
- package/resources/org/project/api-keys.d.mts.map +0 -1
- package/resources/org/project/api-keys.d.ts +0 -142
- package/resources/org/project/api-keys.d.ts.map +0 -1
- package/resources/org/project/api-keys.js +0 -62
- package/resources/org/project/api-keys.js.map +0 -1
- package/resources/org/project/api-keys.mjs +0 -58
- package/resources/org/project/api-keys.mjs.map +0 -1
- package/resources/org/project/index.d.mts +0 -5
- package/resources/org/project/index.d.mts.map +0 -1
- package/resources/org/project/index.d.ts +0 -5
- package/resources/org/project/index.d.ts.map +0 -1
- package/resources/org/project/index.js +0 -13
- package/resources/org/project/index.js.map +0 -1
- package/resources/org/project/index.mjs +0 -6
- package/resources/org/project/index.mjs.map +0 -1
- package/resources/org/project/project.d.mts +0 -268
- package/resources/org/project/project.d.mts.map +0 -1
- package/resources/org/project/project.d.ts +0 -268
- package/resources/org/project/project.d.ts.map +0 -1
- package/resources/org/project/project.js +0 -90
- package/resources/org/project/project.js.map +0 -1
- package/resources/org/project/project.mjs +0 -85
- package/resources/org/project/project.mjs.map +0 -1
- package/resources/org/project/trigger.d.mts +0 -145
- package/resources/org/project/trigger.d.mts.map +0 -1
- package/resources/org/project/trigger.d.ts +0 -145
- package/resources/org/project/trigger.d.ts.map +0 -1
- package/resources/org/project/trigger.js +0 -35
- package/resources/org/project/trigger.js.map +0 -1
- package/resources/org/project/trigger.mjs +0 -31
- package/resources/org/project/trigger.mjs.map +0 -1
- package/resources/org/project/webhook.d.mts +0 -166
- package/resources/org/project/webhook.d.mts.map +0 -1
- package/resources/org/project/webhook.d.ts +0 -166
- package/resources/org/project/webhook.d.ts.map +0 -1
- package/resources/org/project/webhook.js +0 -74
- package/resources/org/project/webhook.js.map +0 -1
- package/resources/org/project/webhook.mjs +0 -70
- package/resources/org/project/webhook.mjs.map +0 -1
- package/resources/org/project.d.mts +0 -2
- package/resources/org/project.d.mts.map +0 -1
- package/resources/org/project.d.ts +0 -2
- package/resources/org/project.d.ts.map +0 -1
- package/resources/org/project.js +0 -6
- package/resources/org/project.js.map +0 -1
- package/resources/org/project.mjs +0 -3
- package/resources/org/project.mjs.map +0 -1
- package/resources/org.d.mts +0 -2
- package/resources/org.d.mts.map +0 -1
- package/resources/org.d.ts +0 -2
- package/resources/org.d.ts.map +0 -1
- package/resources/org.js +0 -6
- package/resources/org.js.map +0 -1
- package/resources/org.mjs +0 -3
- package/resources/org.mjs.map +0 -1
- package/resources/team-members.d.mts +0 -55
- package/resources/team-members.d.mts.map +0 -1
- package/resources/team-members.d.ts +0 -55
- package/resources/team-members.d.ts.map +0 -1
- package/resources/team-members.js +0 -38
- package/resources/team-members.js.map +0 -1
- package/resources/team-members.mjs +0 -34
- package/resources/team-members.mjs.map +0 -1
- package/resources/trigger-instances/handle.d.mts +0 -25
- package/resources/trigger-instances/handle.d.mts.map +0 -1
- package/resources/trigger-instances/handle.d.ts +0 -25
- package/resources/trigger-instances/handle.d.ts.map +0 -1
- package/resources/trigger-instances/handle.js +0 -18
- package/resources/trigger-instances/handle.js.map +0 -1
- package/resources/trigger-instances/handle.mjs +0 -14
- package/resources/trigger-instances/handle.mjs.map +0 -1
- package/src/resources/org/api-key.ts +0 -57
- package/src/resources/org/index.ts +0 -13
- package/src/resources/org/org.ts +0 -41
- package/src/resources/org/project/api-keys.ts +0 -180
- package/src/resources/org/project/index.ts +0 -35
- package/src/resources/org/project/project.ts +0 -381
- package/src/resources/org/project/trigger.ts +0 -188
- package/src/resources/org/project/webhook.ts +0 -205
- package/src/resources/org/project.ts +0 -3
- package/src/resources/org.ts +0 -3
- package/src/resources/team-members.ts +0 -101
- package/src/resources/trigger-instances/handle.ts +0 -53
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
-
export declare class Trigger extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Updates the trigger enablement status for the current project. Use this endpoint
|
|
7
|
-
* to enable or disable triggers for automated workflows within a project.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const trigger = await client.org.project.trigger.update();
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
update(params?: TriggerUpdateParams | null | undefined, options?: RequestOptions): APIPromise<TriggerUpdateResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* Retrieves the current project details including its trigger enablement status.
|
|
17
|
-
* Use this endpoint to check whether triggers are currently enabled or disabled
|
|
18
|
-
* for a project.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* const triggers = await client.org.project.trigger.list();
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
list(options?: RequestOptions): APIPromise<TriggerListResponse>;
|
|
26
|
-
}
|
|
27
|
-
export interface TriggerUpdateResponse {
|
|
28
|
-
/**
|
|
29
|
-
* Unique identifier for the project
|
|
30
|
-
*/
|
|
31
|
-
id: string;
|
|
32
|
-
/**
|
|
33
|
-
* ISO timestamp when the project was created
|
|
34
|
-
*/
|
|
35
|
-
created_at: string;
|
|
36
|
-
/**
|
|
37
|
-
* Whether this project has been soft-deleted
|
|
38
|
-
*/
|
|
39
|
-
deleted: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Email address associated with the project
|
|
42
|
-
*/
|
|
43
|
-
email: string;
|
|
44
|
-
/**
|
|
45
|
-
* URL where event webhook notifications will be sent (can be null)
|
|
46
|
-
*/
|
|
47
|
-
event_webhook_url: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* Name of the project
|
|
50
|
-
*/
|
|
51
|
-
name: string;
|
|
52
|
-
/**
|
|
53
|
-
* Identifier of the organization that owns this project
|
|
54
|
-
*/
|
|
55
|
-
org_id: string;
|
|
56
|
-
/**
|
|
57
|
-
* ISO timestamp when the project was last updated
|
|
58
|
-
*/
|
|
59
|
-
updated_at: string;
|
|
60
|
-
/**
|
|
61
|
-
* Secret key used to sign webhook payloads for verification
|
|
62
|
-
*/
|
|
63
|
-
webhook_secret: string | null;
|
|
64
|
-
/**
|
|
65
|
-
* URL where webhook events will be sent (can be null)
|
|
66
|
-
*/
|
|
67
|
-
webhook_url: string | null;
|
|
68
|
-
/**
|
|
69
|
-
* Indicates if the webhook configuration is using the new format
|
|
70
|
-
*/
|
|
71
|
-
is_new_webhook?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* ISO timestamp when the project last subscribed to updates
|
|
74
|
-
*/
|
|
75
|
-
last_subscribed_at?: string | null;
|
|
76
|
-
/**
|
|
77
|
-
* Whether triggers are enabled for this project
|
|
78
|
-
*/
|
|
79
|
-
triggers_enabled?: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface TriggerListResponse {
|
|
82
|
-
/**
|
|
83
|
-
* Unique identifier for the project
|
|
84
|
-
*/
|
|
85
|
-
id: string;
|
|
86
|
-
/**
|
|
87
|
-
* ISO timestamp when the project was created
|
|
88
|
-
*/
|
|
89
|
-
created_at: string;
|
|
90
|
-
/**
|
|
91
|
-
* Whether this project has been soft-deleted
|
|
92
|
-
*/
|
|
93
|
-
deleted: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Email address associated with the project
|
|
96
|
-
*/
|
|
97
|
-
email: string;
|
|
98
|
-
/**
|
|
99
|
-
* URL where event webhook notifications will be sent (can be null)
|
|
100
|
-
*/
|
|
101
|
-
event_webhook_url: string | null;
|
|
102
|
-
/**
|
|
103
|
-
* Name of the project
|
|
104
|
-
*/
|
|
105
|
-
name: string;
|
|
106
|
-
/**
|
|
107
|
-
* Identifier of the organization that owns this project
|
|
108
|
-
*/
|
|
109
|
-
org_id: string;
|
|
110
|
-
/**
|
|
111
|
-
* ISO timestamp when the project was last updated
|
|
112
|
-
*/
|
|
113
|
-
updated_at: string;
|
|
114
|
-
/**
|
|
115
|
-
* Secret key used to sign webhook payloads for verification
|
|
116
|
-
*/
|
|
117
|
-
webhook_secret: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* URL where webhook events will be sent (can be null)
|
|
120
|
-
*/
|
|
121
|
-
webhook_url: string | null;
|
|
122
|
-
/**
|
|
123
|
-
* Indicates if the webhook configuration is using the new format
|
|
124
|
-
*/
|
|
125
|
-
is_new_webhook?: boolean;
|
|
126
|
-
/**
|
|
127
|
-
* ISO timestamp when the project last subscribed to updates
|
|
128
|
-
*/
|
|
129
|
-
last_subscribed_at?: string | null;
|
|
130
|
-
/**
|
|
131
|
-
* Whether triggers are enabled for this project
|
|
132
|
-
*/
|
|
133
|
-
triggers_enabled?: boolean;
|
|
134
|
-
}
|
|
135
|
-
export interface TriggerUpdateParams {
|
|
136
|
-
/**
|
|
137
|
-
* Boolean flag indicating whether triggers should be enabled (true) or disabled
|
|
138
|
-
* (false) for the project
|
|
139
|
-
*/
|
|
140
|
-
enabled?: boolean | null;
|
|
141
|
-
}
|
|
142
|
-
export declare namespace Trigger {
|
|
143
|
-
export { type TriggerUpdateResponse as TriggerUpdateResponse, type TriggerListResponse as TriggerListResponse, type TriggerUpdateParams as TriggerUpdateParams, };
|
|
144
|
-
}
|
|
145
|
-
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../src/resources/org/project/trigger.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,MAAM,CACJ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AU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Trigger = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
class Trigger extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Updates the trigger enablement status for the current project. Use this endpoint
|
|
9
|
-
* to enable or disable triggers for automated workflows within a project.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const trigger = await client.org.project.trigger.update();
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
update(params = {}, options) {
|
|
17
|
-
const { enabled } = params ?? {};
|
|
18
|
-
return this._client.patch('/api/v3/org/project/trigger', { query: { enabled }, ...options });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves the current project details including its trigger enablement status.
|
|
22
|
-
* Use this endpoint to check whether triggers are currently enabled or disabled
|
|
23
|
-
* for a project.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* const triggers = await client.org.project.trigger.list();
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
list(options) {
|
|
31
|
-
return this._client.get('/api/v3/org/project/trigger', options);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.Trigger = Trigger;
|
|
35
|
-
//# sourceMappingURL=trigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../src/resources/org/project/trigger.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;OAQG;IACH,MAAM,CACJ,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AA/BD,0BA+BC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
export class Trigger extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Updates the trigger enablement status for the current project. Use this endpoint
|
|
6
|
-
* to enable or disable triggers for automated workflows within a project.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const trigger = await client.org.project.trigger.update();
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
update(params = {}, options) {
|
|
14
|
-
const { enabled } = params ?? {};
|
|
15
|
-
return this._client.patch('/api/v3/org/project/trigger', { query: { enabled }, ...options });
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves the current project details including its trigger enablement status.
|
|
19
|
-
* Use this endpoint to check whether triggers are currently enabled or disabled
|
|
20
|
-
* for a project.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const triggers = await client.org.project.trigger.list();
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
list(options) {
|
|
28
|
-
return this._client.get('/api/v3/org/project/trigger', options);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=trigger.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.mjs","sourceRoot":"","sources":["../../../src/resources/org/project/trigger.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,MAAM,CACJ,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
-
export declare class Webhook extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the webhook URL and secret for the current project. Webhooks come in
|
|
7
|
-
* two types: "trigger" webhooks are used for integration trigger events, while
|
|
8
|
-
* "event" webhooks receive system notifications about project events. The response
|
|
9
|
-
* includes both the URL and the secret key used to verify webhook signatures.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const webhook = await client.org.project.webhook.retrieve({
|
|
14
|
-
* type: 'trigger',
|
|
15
|
-
* });
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
retrieve(query: WebhookRetrieveParams, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Updates the webhook URL for the current project based on the specified type
|
|
21
|
-
* (trigger or event). Webhook URLs are endpoints that receive notifications about
|
|
22
|
-
* events in your project. "Trigger" webhooks receive integration trigger events,
|
|
23
|
-
* while "event" webhooks receive system notifications. This endpoint allows you to
|
|
24
|
-
* set or change these notification destinations.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const webhook = await client.org.project.webhook.update({
|
|
29
|
-
* type: 'trigger',
|
|
30
|
-
* webhook_url: 'https://example.com/api/webhooks/triggers',
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
update(body: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Removes a webhook URL (trigger or event) from the project configuration. This
|
|
37
|
-
* operation sets the specified webhook URL to null in the database but preserves
|
|
38
|
-
* the webhook secret. After deletion, the project will no longer receive webhook
|
|
39
|
-
* notifications of the specified type until a new URL is configured.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const webhook = await client.org.project.webhook.delete({
|
|
44
|
-
* type: 'trigger',
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
delete(body: WebhookDeleteParams, options?: RequestOptions): APIPromise<WebhookDeleteResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* Generates a new webhook secret for the project, invalidating the previous one.
|
|
51
|
-
* Webhook secrets are used to verify the authenticity of incoming webhook payloads
|
|
52
|
-
* through signature verification. This endpoint should be used when you need to
|
|
53
|
-
* rotate your webhook secret for security purposes. After refreshing, you must
|
|
54
|
-
* update your webhook verification logic to use the new secret.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* const response = await client.org.project.webhook.refresh();
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
refresh(options?: RequestOptions): APIPromise<WebhookRefreshResponse>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Response containing webhook URL configuration and secret
|
|
65
|
-
*/
|
|
66
|
-
export interface WebhookRetrieveResponse {
|
|
67
|
-
/**
|
|
68
|
-
* Indicates whether the webhook was found and retrieved successfully
|
|
69
|
-
*/
|
|
70
|
-
status: 'success' | 'not found';
|
|
71
|
-
/**
|
|
72
|
-
* The webhook configuration containing either trigger or event webhook URL
|
|
73
|
-
*/
|
|
74
|
-
url: WebhookRetrieveResponse.UnionMember0 | WebhookRetrieveResponse.UnionMember1;
|
|
75
|
-
/**
|
|
76
|
-
* The secret key that should be used to verify webhook signatures
|
|
77
|
-
*/
|
|
78
|
-
webhook_secret: string;
|
|
79
|
-
}
|
|
80
|
-
export declare namespace WebhookRetrieveResponse {
|
|
81
|
-
interface UnionMember0 {
|
|
82
|
-
/**
|
|
83
|
-
* Identifies this as a trigger webhook response
|
|
84
|
-
*/
|
|
85
|
-
type: 'trigger';
|
|
86
|
-
/**
|
|
87
|
-
* The URL endpoint where trigger notifications will be delivered
|
|
88
|
-
*/
|
|
89
|
-
webhook_url?: string;
|
|
90
|
-
}
|
|
91
|
-
interface UnionMember1 {
|
|
92
|
-
/**
|
|
93
|
-
* Identifies this as an event webhook response
|
|
94
|
-
*/
|
|
95
|
-
type: 'event';
|
|
96
|
-
/**
|
|
97
|
-
* The URL endpoint where event notifications will be delivered
|
|
98
|
-
*/
|
|
99
|
-
event_webhook_url?: string;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Response indicating the status of the webhook URL update operation
|
|
104
|
-
*/
|
|
105
|
-
export interface WebhookUpdateResponse {
|
|
106
|
-
/**
|
|
107
|
-
* Human-readable description of the update operation result
|
|
108
|
-
*/
|
|
109
|
-
message: string;
|
|
110
|
-
/**
|
|
111
|
-
* Indicates if the webhook URL update was completed successfully
|
|
112
|
-
*/
|
|
113
|
-
success: boolean;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Response indicating successful webhook URL deletion
|
|
117
|
-
*/
|
|
118
|
-
export interface WebhookDeleteResponse {
|
|
119
|
-
/**
|
|
120
|
-
* Indicates the webhook URL was successfully removed
|
|
121
|
-
*/
|
|
122
|
-
status: 'success';
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Response containing the newly generated webhook secret
|
|
126
|
-
*/
|
|
127
|
-
export interface WebhookRefreshResponse {
|
|
128
|
-
/**
|
|
129
|
-
* Human-readable description of the refresh operation result
|
|
130
|
-
*/
|
|
131
|
-
message: string;
|
|
132
|
-
/**
|
|
133
|
-
* Indicates if the webhook secret was successfully refreshed
|
|
134
|
-
*/
|
|
135
|
-
success: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* The new secret key that should be used to verify incoming webhook payloads
|
|
138
|
-
*/
|
|
139
|
-
webhook_secret: string;
|
|
140
|
-
}
|
|
141
|
-
export interface WebhookRetrieveParams {
|
|
142
|
-
/**
|
|
143
|
-
* Type of webhook to retrieve (trigger or event)
|
|
144
|
-
*/
|
|
145
|
-
type: 'trigger' | 'event';
|
|
146
|
-
}
|
|
147
|
-
export interface WebhookUpdateParams {
|
|
148
|
-
/**
|
|
149
|
-
* Specifies which webhook type to update (trigger or event)
|
|
150
|
-
*/
|
|
151
|
-
type: 'trigger' | 'event';
|
|
152
|
-
/**
|
|
153
|
-
* Valid URL that will receive webhook payloads. Must include https:// protocol.
|
|
154
|
-
*/
|
|
155
|
-
webhook_url: string;
|
|
156
|
-
}
|
|
157
|
-
export interface WebhookDeleteParams {
|
|
158
|
-
/**
|
|
159
|
-
* Specifies which webhook type to remove from the project configuration
|
|
160
|
-
*/
|
|
161
|
-
type: 'trigger' | 'event';
|
|
162
|
-
}
|
|
163
|
-
export declare namespace Webhook {
|
|
164
|
-
export { type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookRefreshResponse as WebhookRefreshResponse, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookDeleteParams as WebhookDeleteParams, };
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=webhook.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.mts","sourceRoot":"","sources":["../../../src/resources/org/project/webhook.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAAK,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIrG;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,C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,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
-
export declare class Webhook extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the webhook URL and secret for the current project. Webhooks come in
|
|
7
|
-
* two types: "trigger" webhooks are used for integration trigger events, while
|
|
8
|
-
* "event" webhooks receive system notifications about project events. The response
|
|
9
|
-
* includes both the URL and the secret key used to verify webhook signatures.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const webhook = await client.org.project.webhook.retrieve({
|
|
14
|
-
* type: 'trigger',
|
|
15
|
-
* });
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
retrieve(query: WebhookRetrieveParams, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Updates the webhook URL for the current project based on the specified type
|
|
21
|
-
* (trigger or event). Webhook URLs are endpoints that receive notifications about
|
|
22
|
-
* events in your project. "Trigger" webhooks receive integration trigger events,
|
|
23
|
-
* while "event" webhooks receive system notifications. This endpoint allows you to
|
|
24
|
-
* set or change these notification destinations.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const webhook = await client.org.project.webhook.update({
|
|
29
|
-
* type: 'trigger',
|
|
30
|
-
* webhook_url: 'https://example.com/api/webhooks/triggers',
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
update(body: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Removes a webhook URL (trigger or event) from the project configuration. This
|
|
37
|
-
* operation sets the specified webhook URL to null in the database but preserves
|
|
38
|
-
* the webhook secret. After deletion, the project will no longer receive webhook
|
|
39
|
-
* notifications of the specified type until a new URL is configured.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const webhook = await client.org.project.webhook.delete({
|
|
44
|
-
* type: 'trigger',
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
delete(body: WebhookDeleteParams, options?: RequestOptions): APIPromise<WebhookDeleteResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* Generates a new webhook secret for the project, invalidating the previous one.
|
|
51
|
-
* Webhook secrets are used to verify the authenticity of incoming webhook payloads
|
|
52
|
-
* through signature verification. This endpoint should be used when you need to
|
|
53
|
-
* rotate your webhook secret for security purposes. After refreshing, you must
|
|
54
|
-
* update your webhook verification logic to use the new secret.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* const response = await client.org.project.webhook.refresh();
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
refresh(options?: RequestOptions): APIPromise<WebhookRefreshResponse>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Response containing webhook URL configuration and secret
|
|
65
|
-
*/
|
|
66
|
-
export interface WebhookRetrieveResponse {
|
|
67
|
-
/**
|
|
68
|
-
* Indicates whether the webhook was found and retrieved successfully
|
|
69
|
-
*/
|
|
70
|
-
status: 'success' | 'not found';
|
|
71
|
-
/**
|
|
72
|
-
* The webhook configuration containing either trigger or event webhook URL
|
|
73
|
-
*/
|
|
74
|
-
url: WebhookRetrieveResponse.UnionMember0 | WebhookRetrieveResponse.UnionMember1;
|
|
75
|
-
/**
|
|
76
|
-
* The secret key that should be used to verify webhook signatures
|
|
77
|
-
*/
|
|
78
|
-
webhook_secret: string;
|
|
79
|
-
}
|
|
80
|
-
export declare namespace WebhookRetrieveResponse {
|
|
81
|
-
interface UnionMember0 {
|
|
82
|
-
/**
|
|
83
|
-
* Identifies this as a trigger webhook response
|
|
84
|
-
*/
|
|
85
|
-
type: 'trigger';
|
|
86
|
-
/**
|
|
87
|
-
* The URL endpoint where trigger notifications will be delivered
|
|
88
|
-
*/
|
|
89
|
-
webhook_url?: string;
|
|
90
|
-
}
|
|
91
|
-
interface UnionMember1 {
|
|
92
|
-
/**
|
|
93
|
-
* Identifies this as an event webhook response
|
|
94
|
-
*/
|
|
95
|
-
type: 'event';
|
|
96
|
-
/**
|
|
97
|
-
* The URL endpoint where event notifications will be delivered
|
|
98
|
-
*/
|
|
99
|
-
event_webhook_url?: string;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Response indicating the status of the webhook URL update operation
|
|
104
|
-
*/
|
|
105
|
-
export interface WebhookUpdateResponse {
|
|
106
|
-
/**
|
|
107
|
-
* Human-readable description of the update operation result
|
|
108
|
-
*/
|
|
109
|
-
message: string;
|
|
110
|
-
/**
|
|
111
|
-
* Indicates if the webhook URL update was completed successfully
|
|
112
|
-
*/
|
|
113
|
-
success: boolean;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Response indicating successful webhook URL deletion
|
|
117
|
-
*/
|
|
118
|
-
export interface WebhookDeleteResponse {
|
|
119
|
-
/**
|
|
120
|
-
* Indicates the webhook URL was successfully removed
|
|
121
|
-
*/
|
|
122
|
-
status: 'success';
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Response containing the newly generated webhook secret
|
|
126
|
-
*/
|
|
127
|
-
export interface WebhookRefreshResponse {
|
|
128
|
-
/**
|
|
129
|
-
* Human-readable description of the refresh operation result
|
|
130
|
-
*/
|
|
131
|
-
message: string;
|
|
132
|
-
/**
|
|
133
|
-
* Indicates if the webhook secret was successfully refreshed
|
|
134
|
-
*/
|
|
135
|
-
success: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* The new secret key that should be used to verify incoming webhook payloads
|
|
138
|
-
*/
|
|
139
|
-
webhook_secret: string;
|
|
140
|
-
}
|
|
141
|
-
export interface WebhookRetrieveParams {
|
|
142
|
-
/**
|
|
143
|
-
* Type of webhook to retrieve (trigger or event)
|
|
144
|
-
*/
|
|
145
|
-
type: 'trigger' | 'event';
|
|
146
|
-
}
|
|
147
|
-
export interface WebhookUpdateParams {
|
|
148
|
-
/**
|
|
149
|
-
* Specifies which webhook type to update (trigger or event)
|
|
150
|
-
*/
|
|
151
|
-
type: 'trigger' | 'event';
|
|
152
|
-
/**
|
|
153
|
-
* Valid URL that will receive webhook payloads. Must include https:// protocol.
|
|
154
|
-
*/
|
|
155
|
-
webhook_url: string;
|
|
156
|
-
}
|
|
157
|
-
export interface WebhookDeleteParams {
|
|
158
|
-
/**
|
|
159
|
-
* Specifies which webhook type to remove from the project configuration
|
|
160
|
-
*/
|
|
161
|
-
type: 'trigger' | 'event';
|
|
162
|
-
}
|
|
163
|
-
export declare namespace Webhook {
|
|
164
|
-
export { type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookRefreshResponse as WebhookRefreshResponse, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookDeleteParams as WebhookDeleteParams, };
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=webhook.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"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,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAE1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Webhook = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
class Webhook extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Retrieves the webhook URL and secret for the current project. Webhooks come in
|
|
9
|
-
* two types: "trigger" webhooks are used for integration trigger events, while
|
|
10
|
-
* "event" webhooks receive system notifications about project events. The response
|
|
11
|
-
* includes both the URL and the secret key used to verify webhook signatures.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const webhook = await client.org.project.webhook.retrieve({
|
|
16
|
-
* type: 'trigger',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
retrieve(query, options) {
|
|
21
|
-
return this._client.get('/api/v3/org/project/webhook', { query, ...options });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Updates the webhook URL for the current project based on the specified type
|
|
25
|
-
* (trigger or event). Webhook URLs are endpoints that receive notifications about
|
|
26
|
-
* events in your project. "Trigger" webhooks receive integration trigger events,
|
|
27
|
-
* while "event" webhooks receive system notifications. This endpoint allows you to
|
|
28
|
-
* set or change these notification destinations.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const webhook = await client.org.project.webhook.update({
|
|
33
|
-
* type: 'trigger',
|
|
34
|
-
* webhook_url: 'https://example.com/api/webhooks/triggers',
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
update(body, options) {
|
|
39
|
-
return this._client.post('/api/v3/org/project/webhook/update', { body, ...options });
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Removes a webhook URL (trigger or event) from the project configuration. This
|
|
43
|
-
* operation sets the specified webhook URL to null in the database but preserves
|
|
44
|
-
* the webhook secret. After deletion, the project will no longer receive webhook
|
|
45
|
-
* notifications of the specified type until a new URL is configured.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const webhook = await client.org.project.webhook.delete({
|
|
50
|
-
* type: 'trigger',
|
|
51
|
-
* });
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
delete(body, options) {
|
|
55
|
-
return this._client.delete('/api/v3/org/project/webhook', { body, ...options });
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Generates a new webhook secret for the project, invalidating the previous one.
|
|
59
|
-
* Webhook secrets are used to verify the authenticity of incoming webhook payloads
|
|
60
|
-
* through signature verification. This endpoint should be used when you need to
|
|
61
|
-
* rotate your webhook secret for security purposes. After refreshing, you must
|
|
62
|
-
* update your webhook verification logic to use the new secret.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```ts
|
|
66
|
-
* const response = await client.org.project.webhook.refresh();
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
refresh(options) {
|
|
70
|
-
return this._client.post('/api/v3/org/project/webhook/refresh', options);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.Webhook = Webhook;
|
|
74
|
-
//# sourceMappingURL=webhook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/resources/org/project/webhook.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAA4B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAwB;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AArED,0BAqEC"}
|