@cadraos/sdk 0.3.14 → 0.3.15
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/dist/chat/index.cjs +6 -2
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +4 -1
- package/dist/chat/index.d.ts +4 -1
- package/dist/chat/index.js +6 -2
- package/dist/chat/index.js.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/kanban/index.cjs +6 -2
- package/dist/kanban/index.cjs.map +1 -1
- package/dist/kanban/index.d.cts +4 -1
- package/dist/kanban/index.d.ts +4 -1
- package/dist/kanban/index.js +6 -2
- package/dist/kanban/index.js.map +1 -1
- package/dist/teams/index.cjs +6 -2
- package/dist/teams/index.cjs.map +1 -1
- package/dist/teams/index.d.cts +4 -1
- package/dist/teams/index.d.ts +4 -1
- package/dist/teams/index.js +6 -2
- package/dist/teams/index.js.map +1 -1
- package/package.json +1 -1
package/dist/teams/index.d.cts
CHANGED
|
@@ -68,7 +68,8 @@ interface RequestOptions {
|
|
|
68
68
|
/**
|
|
69
69
|
* Per-request timeout in milliseconds. Overrides the client-wide
|
|
70
70
|
* `config.timeout` for this call only (p93 AIF-010: a paid AI-function run
|
|
71
|
-
*
|
|
71
|
+
* waits for the server's route ceiling while every other call keeps the
|
|
72
|
+
* 30 s default).
|
|
72
73
|
*/
|
|
73
74
|
timeoutMs?: number;
|
|
74
75
|
}
|
|
@@ -80,6 +81,8 @@ declare class HttpClient {
|
|
|
80
81
|
private tokenRefreshAttempts;
|
|
81
82
|
private readonly maxTokenRefreshAttempts;
|
|
82
83
|
constructor(config: HttpClientConfig);
|
|
84
|
+
/** The client-wide request timeout (ms) this client was configured with. */
|
|
85
|
+
get timeoutMs(): number;
|
|
83
86
|
/**
|
|
84
87
|
* Get authorization header value
|
|
85
88
|
*/
|
package/dist/teams/index.d.ts
CHANGED
|
@@ -68,7 +68,8 @@ interface RequestOptions {
|
|
|
68
68
|
/**
|
|
69
69
|
* Per-request timeout in milliseconds. Overrides the client-wide
|
|
70
70
|
* `config.timeout` for this call only (p93 AIF-010: a paid AI-function run
|
|
71
|
-
*
|
|
71
|
+
* waits for the server's route ceiling while every other call keeps the
|
|
72
|
+
* 30 s default).
|
|
72
73
|
*/
|
|
73
74
|
timeoutMs?: number;
|
|
74
75
|
}
|
|
@@ -80,6 +81,8 @@ declare class HttpClient {
|
|
|
80
81
|
private tokenRefreshAttempts;
|
|
81
82
|
private readonly maxTokenRefreshAttempts;
|
|
82
83
|
constructor(config: HttpClientConfig);
|
|
84
|
+
/** The client-wide request timeout (ms) this client was configured with. */
|
|
85
|
+
get timeoutMs(): number;
|
|
83
86
|
/**
|
|
84
87
|
* Get authorization header value
|
|
85
88
|
*/
|
package/dist/teams/index.js
CHANGED
|
@@ -291,6 +291,10 @@ var HttpClient = class {
|
|
|
291
291
|
constructor(config) {
|
|
292
292
|
this.config = config;
|
|
293
293
|
}
|
|
294
|
+
/** The client-wide request timeout (ms) this client was configured with. */
|
|
295
|
+
get timeoutMs() {
|
|
296
|
+
return this.config.timeout;
|
|
297
|
+
}
|
|
294
298
|
/**
|
|
295
299
|
* Get authorization header value
|
|
296
300
|
*/
|
|
@@ -3407,7 +3411,7 @@ var RemoteRunnersAPI = class extends BaseResourceAPI {
|
|
|
3407
3411
|
};
|
|
3408
3412
|
|
|
3409
3413
|
// src/resources/ai-functions.ts
|
|
3410
|
-
var AI_FUNCTION_RUN_TIMEOUT_MS =
|
|
3414
|
+
var AI_FUNCTION_RUN_TIMEOUT_MS = 31e4;
|
|
3411
3415
|
var AI_FUNCTION_DESCRIPTOR_TTL_MS = 6e4;
|
|
3412
3416
|
function checkAiFunctionParameters(parameters, variables) {
|
|
3413
3417
|
const issues = [];
|
|
@@ -3520,7 +3524,7 @@ var AiFunctionsAPI = class extends BaseResourceAPI {
|
|
|
3520
3524
|
try {
|
|
3521
3525
|
return await this.httpPost("/run", body, {
|
|
3522
3526
|
skipRetry: true,
|
|
3523
|
-
timeoutMs: AI_FUNCTION_RUN_TIMEOUT_MS
|
|
3527
|
+
timeoutMs: Math.max(AI_FUNCTION_RUN_TIMEOUT_MS, this.http.timeoutMs ?? 0)
|
|
3524
3528
|
});
|
|
3525
3529
|
} catch (error) {
|
|
3526
3530
|
throw this.mapRunError(error, functionKey);
|