@composio/client 0.1.0-alpha.57 → 0.1.0-alpha.59
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 +18 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- 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 +170 -0
- package/resources/logs/tools.d.mts.map +1 -0
- package/resources/logs/tools.d.ts +170 -0
- package/resources/logs/tools.d.ts.map +1 -0
- package/resources/logs/tools.js +32 -0
- package/resources/logs/tools.js.map +1 -0
- package/resources/logs/tools.mjs +28 -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 -1
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +293 -1
- 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/tools.d.mts +8 -0
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +8 -0
- package/resources/tools.d.ts.map +1 -1
- package/src/client.ts +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/logs/index.ts +5 -0
- package/src/resources/logs/logs.ts +30 -0
- package/src/resources/logs/tools.ts +236 -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 -0
- package/src/resources/tool-router/tool-router.ts +4 -0
- package/src/resources/tools.ts +10 -0
- 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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as ToolsAPI from "./tools.mjs";
|
|
4
|
+
import { Tools } from "./tools.mjs";
|
|
5
|
+
import * as TriggersAPI from "./triggers.mjs";
|
|
6
|
+
import { Triggers } from "./triggers.mjs";
|
|
7
|
+
export class Logs extends APIResource {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.triggers = new TriggersAPI.Triggers(this._client);
|
|
11
|
+
this.tools = new ToolsAPI.Tools(this._client);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
Logs.Triggers = Triggers;
|
|
15
|
+
Logs.Tools = Tools;
|
|
16
|
+
//# sourceMappingURL=logs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.mjs","sourceRoot":"","sources":["../../src/resources/logs/logs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAA0D,KAAK,EAAE;OACjE,KAAK,WAAW;OAChB,EAA0C,QAAQ,EAAE;AAE3D,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
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 Tools extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get detailed execution log by ID
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const tool = await client.logs.tools.retrieve('id');
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<ToolRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Search and retrieve action execution logs
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const tools = await client.logs.tools.list({ cursor: 0 });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
list(body: ToolListParams, options?: RequestOptions): APIPromise<ToolListResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface ToolRetrieveResponse {
|
|
25
|
+
actionId: string;
|
|
26
|
+
actionLogId: string;
|
|
27
|
+
app: ToolRetrieveResponse.App;
|
|
28
|
+
connection: ToolRetrieveResponse.Connection;
|
|
29
|
+
endTime: number;
|
|
30
|
+
error: {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
executionMetadata: {
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
payloadReceived: {
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
response: {
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
session: {
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
startTime: number;
|
|
46
|
+
status: 'success' | 'error' | 'warning' | 'info';
|
|
47
|
+
steps: Array<ToolRetrieveResponse.Step>;
|
|
48
|
+
totalDuration: string;
|
|
49
|
+
version: string;
|
|
50
|
+
}
|
|
51
|
+
export declare namespace ToolRetrieveResponse {
|
|
52
|
+
interface App {
|
|
53
|
+
icon: string;
|
|
54
|
+
name: string;
|
|
55
|
+
uniqueId: string;
|
|
56
|
+
}
|
|
57
|
+
interface Connection {
|
|
58
|
+
id: string;
|
|
59
|
+
entity: string;
|
|
60
|
+
}
|
|
61
|
+
interface Step {
|
|
62
|
+
endTime: number;
|
|
63
|
+
message: string;
|
|
64
|
+
startTime: number;
|
|
65
|
+
status: 'success' | 'failure' | 'error';
|
|
66
|
+
totalDuration: number;
|
|
67
|
+
type: 'tool_execution' | 'fetch_connection_details';
|
|
68
|
+
logs?: Array<Step.Log>;
|
|
69
|
+
metadata?: Step.Metadata;
|
|
70
|
+
}
|
|
71
|
+
namespace Step {
|
|
72
|
+
interface Log {
|
|
73
|
+
level: string;
|
|
74
|
+
message: string;
|
|
75
|
+
request: Log.Request;
|
|
76
|
+
requestId: string;
|
|
77
|
+
response: Log.Response;
|
|
78
|
+
time: number;
|
|
79
|
+
type: 'network' | 'system';
|
|
80
|
+
}
|
|
81
|
+
namespace Log {
|
|
82
|
+
interface Request {
|
|
83
|
+
method: string;
|
|
84
|
+
url: string;
|
|
85
|
+
headers?: {
|
|
86
|
+
[key: string]: string;
|
|
87
|
+
};
|
|
88
|
+
json?: {
|
|
89
|
+
[key: string]: unknown;
|
|
90
|
+
};
|
|
91
|
+
params?: {
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
timeout?: number;
|
|
95
|
+
}
|
|
96
|
+
interface Response {
|
|
97
|
+
status: number;
|
|
98
|
+
time: string;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
interface Metadata {
|
|
102
|
+
encryption?: string;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export interface ToolListResponse {
|
|
107
|
+
data: Array<ToolListResponse.Data>;
|
|
108
|
+
nextCursor: number | null;
|
|
109
|
+
}
|
|
110
|
+
export declare namespace ToolListResponse {
|
|
111
|
+
interface Data {
|
|
112
|
+
id: string;
|
|
113
|
+
actionKey: string;
|
|
114
|
+
app: Data.App;
|
|
115
|
+
appKey: string;
|
|
116
|
+
connectedAccountId: string;
|
|
117
|
+
createdAt: number;
|
|
118
|
+
entityId: string;
|
|
119
|
+
executionTime: number;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated
|
|
122
|
+
*/
|
|
123
|
+
minimalResponse: string;
|
|
124
|
+
status: 'success' | 'failed';
|
|
125
|
+
metadata?: Data.Metadata;
|
|
126
|
+
}
|
|
127
|
+
namespace Data {
|
|
128
|
+
interface App {
|
|
129
|
+
icon: string;
|
|
130
|
+
name: string;
|
|
131
|
+
}
|
|
132
|
+
interface Metadata {
|
|
133
|
+
recipe_id?: string;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export interface ToolListParams {
|
|
138
|
+
/**
|
|
139
|
+
* cursor_that_can_be_used_to_paginate_through_the_logs
|
|
140
|
+
*/
|
|
141
|
+
cursor: number | null;
|
|
142
|
+
/**
|
|
143
|
+
* whether_the_search_is_case_sensitive_or_not
|
|
144
|
+
*/
|
|
145
|
+
case_sensitive?: boolean | null;
|
|
146
|
+
/**
|
|
147
|
+
* start_time_of_the_logs_in_epoch_time
|
|
148
|
+
*/
|
|
149
|
+
from?: number;
|
|
150
|
+
/**
|
|
151
|
+
* number_of_logs_to_return
|
|
152
|
+
*/
|
|
153
|
+
limit?: number;
|
|
154
|
+
search_params?: Array<ToolListParams.SearchParam>;
|
|
155
|
+
/**
|
|
156
|
+
* end_time_of_the_logs_in_epoch_time
|
|
157
|
+
*/
|
|
158
|
+
to?: number;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace ToolListParams {
|
|
161
|
+
interface SearchParam {
|
|
162
|
+
field?: string;
|
|
163
|
+
operation?: string;
|
|
164
|
+
value?: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
export declare namespace Tools {
|
|
168
|
+
export { type ToolRetrieveResponse as ToolRetrieveResponse, type ToolListResponse as ToolListResponse, type ToolListParams as ToolListParams, };
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=tools.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../src/resources/logs/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIhF;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAGnF;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;IAEpB,GAAG,EAAE,oBAAoB,CAAC,GAAG,CAAC;IAE9B,UAAU,EAAE,oBAAoB,CAAC,UAAU,CAAC;IAE5C,OAAO,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAElC,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE9C,eAAe,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE5C,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAErC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEpC,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;I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;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAElD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,WAAW;QAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -0,0 +1,170 @@
|
|
|
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 Tools extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get detailed execution log by ID
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const tool = await client.logs.tools.retrieve('id');
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<ToolRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Search and retrieve action execution logs
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const tools = await client.logs.tools.list({ cursor: 0 });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
list(body: ToolListParams, options?: RequestOptions): APIPromise<ToolListResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface ToolRetrieveResponse {
|
|
25
|
+
actionId: string;
|
|
26
|
+
actionLogId: string;
|
|
27
|
+
app: ToolRetrieveResponse.App;
|
|
28
|
+
connection: ToolRetrieveResponse.Connection;
|
|
29
|
+
endTime: number;
|
|
30
|
+
error: {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
executionMetadata: {
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
payloadReceived: {
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
response: {
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
session: {
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
startTime: number;
|
|
46
|
+
status: 'success' | 'error' | 'warning' | 'info';
|
|
47
|
+
steps: Array<ToolRetrieveResponse.Step>;
|
|
48
|
+
totalDuration: string;
|
|
49
|
+
version: string;
|
|
50
|
+
}
|
|
51
|
+
export declare namespace ToolRetrieveResponse {
|
|
52
|
+
interface App {
|
|
53
|
+
icon: string;
|
|
54
|
+
name: string;
|
|
55
|
+
uniqueId: string;
|
|
56
|
+
}
|
|
57
|
+
interface Connection {
|
|
58
|
+
id: string;
|
|
59
|
+
entity: string;
|
|
60
|
+
}
|
|
61
|
+
interface Step {
|
|
62
|
+
endTime: number;
|
|
63
|
+
message: string;
|
|
64
|
+
startTime: number;
|
|
65
|
+
status: 'success' | 'failure' | 'error';
|
|
66
|
+
totalDuration: number;
|
|
67
|
+
type: 'tool_execution' | 'fetch_connection_details';
|
|
68
|
+
logs?: Array<Step.Log>;
|
|
69
|
+
metadata?: Step.Metadata;
|
|
70
|
+
}
|
|
71
|
+
namespace Step {
|
|
72
|
+
interface Log {
|
|
73
|
+
level: string;
|
|
74
|
+
message: string;
|
|
75
|
+
request: Log.Request;
|
|
76
|
+
requestId: string;
|
|
77
|
+
response: Log.Response;
|
|
78
|
+
time: number;
|
|
79
|
+
type: 'network' | 'system';
|
|
80
|
+
}
|
|
81
|
+
namespace Log {
|
|
82
|
+
interface Request {
|
|
83
|
+
method: string;
|
|
84
|
+
url: string;
|
|
85
|
+
headers?: {
|
|
86
|
+
[key: string]: string;
|
|
87
|
+
};
|
|
88
|
+
json?: {
|
|
89
|
+
[key: string]: unknown;
|
|
90
|
+
};
|
|
91
|
+
params?: {
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
timeout?: number;
|
|
95
|
+
}
|
|
96
|
+
interface Response {
|
|
97
|
+
status: number;
|
|
98
|
+
time: string;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
interface Metadata {
|
|
102
|
+
encryption?: string;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export interface ToolListResponse {
|
|
107
|
+
data: Array<ToolListResponse.Data>;
|
|
108
|
+
nextCursor: number | null;
|
|
109
|
+
}
|
|
110
|
+
export declare namespace ToolListResponse {
|
|
111
|
+
interface Data {
|
|
112
|
+
id: string;
|
|
113
|
+
actionKey: string;
|
|
114
|
+
app: Data.App;
|
|
115
|
+
appKey: string;
|
|
116
|
+
connectedAccountId: string;
|
|
117
|
+
createdAt: number;
|
|
118
|
+
entityId: string;
|
|
119
|
+
executionTime: number;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated
|
|
122
|
+
*/
|
|
123
|
+
minimalResponse: string;
|
|
124
|
+
status: 'success' | 'failed';
|
|
125
|
+
metadata?: Data.Metadata;
|
|
126
|
+
}
|
|
127
|
+
namespace Data {
|
|
128
|
+
interface App {
|
|
129
|
+
icon: string;
|
|
130
|
+
name: string;
|
|
131
|
+
}
|
|
132
|
+
interface Metadata {
|
|
133
|
+
recipe_id?: string;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export interface ToolListParams {
|
|
138
|
+
/**
|
|
139
|
+
* cursor_that_can_be_used_to_paginate_through_the_logs
|
|
140
|
+
*/
|
|
141
|
+
cursor: number | null;
|
|
142
|
+
/**
|
|
143
|
+
* whether_the_search_is_case_sensitive_or_not
|
|
144
|
+
*/
|
|
145
|
+
case_sensitive?: boolean | null;
|
|
146
|
+
/**
|
|
147
|
+
* start_time_of_the_logs_in_epoch_time
|
|
148
|
+
*/
|
|
149
|
+
from?: number;
|
|
150
|
+
/**
|
|
151
|
+
* number_of_logs_to_return
|
|
152
|
+
*/
|
|
153
|
+
limit?: number;
|
|
154
|
+
search_params?: Array<ToolListParams.SearchParam>;
|
|
155
|
+
/**
|
|
156
|
+
* end_time_of_the_logs_in_epoch_time
|
|
157
|
+
*/
|
|
158
|
+
to?: number;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace ToolListParams {
|
|
161
|
+
interface SearchParam {
|
|
162
|
+
field?: string;
|
|
163
|
+
operation?: string;
|
|
164
|
+
value?: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
export declare namespace Tools {
|
|
168
|
+
export { type ToolRetrieveResponse as ToolRetrieveResponse, type ToolListResponse as ToolListResponse, type ToolListParams as ToolListParams, };
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/resources/logs/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIhF;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAGnF;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ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,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.Tools = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class Tools extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get detailed execution log by ID
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const tool = await client.logs.tools.retrieve('id');
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieve(id, options) {
|
|
17
|
+
return this._client.get((0, path_1.path) `/api/v3/internal/action_execution/log/${id}`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Search and retrieve action execution logs
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const tools = await client.logs.tools.list({ cursor: 0 });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(body, options) {
|
|
28
|
+
return this._client.post('/api/v3/internal/action_execution/logs', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Tools = Tools;
|
|
32
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/resources/logs/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yCAAyC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,IAAoB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAxBD,sBAwBC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class Tools extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get detailed execution log by ID
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const tool = await client.logs.tools.retrieve('id');
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id, options) {
|
|
14
|
+
return this._client.get(path `/api/v3/internal/action_execution/log/${id}`, options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Search and retrieve action execution logs
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const tools = await client.logs.tools.list({ cursor: 0 });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
list(body, options) {
|
|
25
|
+
return this._client.post('/api/v3/internal/action_execution/logs', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=tools.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../../src/resources/logs/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,yCAAyC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,IAAoB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1,109 @@
|
|
|
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 Triggers extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Search and retrieve trigger event logs with advanced filtering capabilities
|
|
7
|
+
* including search parameters
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const triggers = await client.logs.triggers.list();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
list(body?: TriggerListParams | null | undefined, options?: RequestOptions): APIPromise<TriggerListResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface TriggerListResponse {
|
|
17
|
+
nextCursor: string | null;
|
|
18
|
+
data?: Array<TriggerListResponse.Data>;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace TriggerListResponse {
|
|
21
|
+
interface Data {
|
|
22
|
+
id: string;
|
|
23
|
+
appName: string;
|
|
24
|
+
clientId: string;
|
|
25
|
+
connectionId: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
entityId: string;
|
|
28
|
+
meta: Data.Meta;
|
|
29
|
+
status: string;
|
|
30
|
+
/**
|
|
31
|
+
* Log entity type (trigger or action)
|
|
32
|
+
*/
|
|
33
|
+
type: 'trigger' | 'action';
|
|
34
|
+
}
|
|
35
|
+
namespace Data {
|
|
36
|
+
interface Meta {
|
|
37
|
+
id: string;
|
|
38
|
+
clientId: string;
|
|
39
|
+
connectionId: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
provider: string;
|
|
42
|
+
/**
|
|
43
|
+
* Log entity type (trigger or action)
|
|
44
|
+
*/
|
|
45
|
+
type: 'trigger' | 'action';
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
triggerClientError?: string;
|
|
48
|
+
triggerClientPayload?: string;
|
|
49
|
+
triggerClientResponse?: string;
|
|
50
|
+
triggerId?: string;
|
|
51
|
+
triggerName?: string;
|
|
52
|
+
triggerNanoId?: string;
|
|
53
|
+
triggerProviderPayload?: string;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export interface TriggerListParams {
|
|
58
|
+
cursor?: string | null;
|
|
59
|
+
entityId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Start time for logs (epoch timestamp in milliseconds)
|
|
62
|
+
*/
|
|
63
|
+
from?: number | null;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to include payload fields in the response. Set to false for faster list
|
|
66
|
+
* views.
|
|
67
|
+
*/
|
|
68
|
+
include_payload?: boolean;
|
|
69
|
+
integrationId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The limit of trigger logs to return
|
|
72
|
+
*/
|
|
73
|
+
limit?: number | null;
|
|
74
|
+
/**
|
|
75
|
+
* Search term to filter logs
|
|
76
|
+
*/
|
|
77
|
+
search?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Advanced search parameters for filtering logs
|
|
80
|
+
*/
|
|
81
|
+
search_params?: Array<TriggerListParams.SearchParam>;
|
|
82
|
+
/**
|
|
83
|
+
* Filter logs by their status level
|
|
84
|
+
*/
|
|
85
|
+
status?: 'all' | 'success' | 'error';
|
|
86
|
+
/**
|
|
87
|
+
* Return logs from the last N time units
|
|
88
|
+
*/
|
|
89
|
+
time?: '5m' | '30m' | '6h' | '1d' | '1w' | '1month' | '1y';
|
|
90
|
+
/**
|
|
91
|
+
* End time for logs (epoch timestamp in milliseconds)
|
|
92
|
+
*/
|
|
93
|
+
to?: number | null;
|
|
94
|
+
/**
|
|
95
|
+
* Filter logs by user ID
|
|
96
|
+
*/
|
|
97
|
+
userId?: string;
|
|
98
|
+
}
|
|
99
|
+
export declare namespace TriggerListParams {
|
|
100
|
+
interface SearchParam {
|
|
101
|
+
field?: string;
|
|
102
|
+
operation?: string;
|
|
103
|
+
value?: string;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export declare namespace Triggers {
|
|
107
|
+
export { type TriggerListResponse as TriggerListResponse, type TriggerListParams as TriggerListParams };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=triggers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.mts","sourceRoot":"","sources":["../../src/resources/logs/triggers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,IAAI,CACF,IAAI,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,IAAI,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX,OAAO,EAAE,MAAM,CAAC;QAEhB,QAAQ,EAAE,MAAM,CAAC;QAEjB,YAAY,EAAE,MAAM,CAAC;QAErB,SAAS,EAAE,MAAM,CAAC;QAElB,QAAQ,EAAE,MAAM,CAAC;QAEjB,IAAI,EAAE,IAAI,CAA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AAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC;IAE3D;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,WAAW;QAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,109 @@
|
|
|
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 Triggers extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Search and retrieve trigger event logs with advanced filtering capabilities
|
|
7
|
+
* including search parameters
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const triggers = await client.logs.triggers.list();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
list(body?: TriggerListParams | null | undefined, options?: RequestOptions): APIPromise<TriggerListResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface TriggerListResponse {
|
|
17
|
+
nextCursor: string | null;
|
|
18
|
+
data?: Array<TriggerListResponse.Data>;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace TriggerListResponse {
|
|
21
|
+
interface Data {
|
|
22
|
+
id: string;
|
|
23
|
+
appName: string;
|
|
24
|
+
clientId: string;
|
|
25
|
+
connectionId: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
entityId: string;
|
|
28
|
+
meta: Data.Meta;
|
|
29
|
+
status: string;
|
|
30
|
+
/**
|
|
31
|
+
* Log entity type (trigger or action)
|
|
32
|
+
*/
|
|
33
|
+
type: 'trigger' | 'action';
|
|
34
|
+
}
|
|
35
|
+
namespace Data {
|
|
36
|
+
interface Meta {
|
|
37
|
+
id: string;
|
|
38
|
+
clientId: string;
|
|
39
|
+
connectionId: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
provider: string;
|
|
42
|
+
/**
|
|
43
|
+
* Log entity type (trigger or action)
|
|
44
|
+
*/
|
|
45
|
+
type: 'trigger' | 'action';
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
triggerClientError?: string;
|
|
48
|
+
triggerClientPayload?: string;
|
|
49
|
+
triggerClientResponse?: string;
|
|
50
|
+
triggerId?: string;
|
|
51
|
+
triggerName?: string;
|
|
52
|
+
triggerNanoId?: string;
|
|
53
|
+
triggerProviderPayload?: string;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export interface TriggerListParams {
|
|
58
|
+
cursor?: string | null;
|
|
59
|
+
entityId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Start time for logs (epoch timestamp in milliseconds)
|
|
62
|
+
*/
|
|
63
|
+
from?: number | null;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to include payload fields in the response. Set to false for faster list
|
|
66
|
+
* views.
|
|
67
|
+
*/
|
|
68
|
+
include_payload?: boolean;
|
|
69
|
+
integrationId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The limit of trigger logs to return
|
|
72
|
+
*/
|
|
73
|
+
limit?: number | null;
|
|
74
|
+
/**
|
|
75
|
+
* Search term to filter logs
|
|
76
|
+
*/
|
|
77
|
+
search?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Advanced search parameters for filtering logs
|
|
80
|
+
*/
|
|
81
|
+
search_params?: Array<TriggerListParams.SearchParam>;
|
|
82
|
+
/**
|
|
83
|
+
* Filter logs by their status level
|
|
84
|
+
*/
|
|
85
|
+
status?: 'all' | 'success' | 'error';
|
|
86
|
+
/**
|
|
87
|
+
* Return logs from the last N time units
|
|
88
|
+
*/
|
|
89
|
+
time?: '5m' | '30m' | '6h' | '1d' | '1w' | '1month' | '1y';
|
|
90
|
+
/**
|
|
91
|
+
* End time for logs (epoch timestamp in milliseconds)
|
|
92
|
+
*/
|
|
93
|
+
to?: number | null;
|
|
94
|
+
/**
|
|
95
|
+
* Filter logs by user ID
|
|
96
|
+
*/
|
|
97
|
+
userId?: string;
|
|
98
|
+
}
|
|
99
|
+
export declare namespace TriggerListParams {
|
|
100
|
+
interface SearchParam {
|
|
101
|
+
field?: string;
|
|
102
|
+
operation?: string;
|
|
103
|
+
value?: string;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export declare namespace Triggers {
|
|
107
|
+
export { type TriggerListResponse as TriggerListResponse, type TriggerListParams as TriggerListParams };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=triggers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../src/resources/logs/triggers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,IAAI,CACF,IAAI,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,IAAI,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX,OAAO,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