@composio/client 0.1.0-alpha.22 → 0.1.0-alpha.23
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 +22 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +22 -19
- package/client.js.map +1 -1
- package/client.mjs +11 -8
- package/client.mjs.map +1 -1
- package/core/resource.d.mts +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -4
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -4
- package/internal/headers.mjs.map +1 -1
- package/internal/qs/formats.d.mts +1 -0
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +15 -17
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts +1 -0
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +14 -13
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts +1 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +1 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.d.mts +2 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +2 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +4 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +2 -0
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/connected-accounts.d.mts +4 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +4 -4
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/mcp/custom.d.mts +2 -2
- package/resources/mcp/custom.d.ts +2 -2
- package/resources/mcp/mcp.d.mts +4 -4
- package/resources/mcp/mcp.d.ts +4 -4
- package/resources/triggers-types.d.mts +2 -2
- package/resources/triggers-types.d.ts +2 -2
- package/resources/v3/internal/action-execution.d.mts +1 -1
- package/resources/v3/internal/action-execution.d.mts.map +1 -1
- package/resources/v3/internal/action-execution.d.ts +1 -1
- package/resources/v3/internal/action-execution.d.ts.map +1 -1
- package/src/client.ts +23 -6
- package/src/core/resource.ts +1 -1
- package/src/internal/headers.ts +5 -5
- package/src/internal/qs/formats.ts +2 -1
- package/src/internal/qs/stringify.ts +17 -20
- package/src/internal/qs/utils.ts +14 -14
- package/src/internal/request-options.ts +1 -0
- package/src/internal/uploads.ts +1 -1
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +1 -1
- package/src/internal/utils/values.ts +3 -0
- package/src/resources/connected-accounts.ts +4 -4
- package/src/resources/mcp/custom.ts +2 -2
- package/src/resources/mcp/mcp.ts +4 -4
- package/src/resources/triggers-types.ts +2 -2
- package/src/resources/v3/internal/action-execution.ts +2 -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
|
@@ -71,8 +71,8 @@ export declare namespace CustomCreateResponse {
|
|
|
71
71
|
}
|
|
72
72
|
export interface CustomCreateParams {
|
|
73
73
|
/**
|
|
74
|
-
* Human-readable name to identify this custom MCP server (4-
|
|
75
|
-
* alphanumeric and hyphens only)
|
|
74
|
+
* Human-readable name to identify this custom MCP server (4-30 characters,
|
|
75
|
+
* alphanumeric, spaces, and hyphens only)
|
|
76
76
|
*/
|
|
77
77
|
name: string;
|
|
78
78
|
/**
|
|
@@ -71,8 +71,8 @@ export declare namespace CustomCreateResponse {
|
|
|
71
71
|
}
|
|
72
72
|
export interface CustomCreateParams {
|
|
73
73
|
/**
|
|
74
|
-
* Human-readable name to identify this custom MCP server (4-
|
|
75
|
-
* alphanumeric and hyphens only)
|
|
74
|
+
* Human-readable name to identify this custom MCP server (4-30 characters,
|
|
75
|
+
* alphanumeric, spaces, and hyphens only)
|
|
76
76
|
*/
|
|
77
77
|
name: string;
|
|
78
78
|
/**
|
package/resources/mcp/mcp.d.mts
CHANGED
|
@@ -566,8 +566,8 @@ export declare namespace McpValidateResponse {
|
|
|
566
566
|
}
|
|
567
567
|
export interface McpCreateParams {
|
|
568
568
|
/**
|
|
569
|
-
* Human-readable name to identify this MCP server instance (4-
|
|
570
|
-
* alphanumeric and hyphens only)
|
|
569
|
+
* Human-readable name to identify this MCP server instance (4-30 characters,
|
|
570
|
+
* alphanumeric, spaces, and hyphens only)
|
|
571
571
|
*/
|
|
572
572
|
name: string;
|
|
573
573
|
/**
|
|
@@ -598,8 +598,8 @@ export interface McpUpdateParams {
|
|
|
598
598
|
*/
|
|
599
599
|
managed_auth_via_composio?: boolean;
|
|
600
600
|
/**
|
|
601
|
-
* Human-readable name to identify this MCP server instance (4-
|
|
602
|
-
* alphanumeric and hyphens only)
|
|
601
|
+
* Human-readable name to identify this MCP server instance (4-30 characters,
|
|
602
|
+
* alphanumeric, spaces, and hyphens only)
|
|
603
603
|
*/
|
|
604
604
|
name?: string;
|
|
605
605
|
/**
|
package/resources/mcp/mcp.d.ts
CHANGED
|
@@ -566,8 +566,8 @@ export declare namespace McpValidateResponse {
|
|
|
566
566
|
}
|
|
567
567
|
export interface McpCreateParams {
|
|
568
568
|
/**
|
|
569
|
-
* Human-readable name to identify this MCP server instance (4-
|
|
570
|
-
* alphanumeric and hyphens only)
|
|
569
|
+
* Human-readable name to identify this MCP server instance (4-30 characters,
|
|
570
|
+
* alphanumeric, spaces, and hyphens only)
|
|
571
571
|
*/
|
|
572
572
|
name: string;
|
|
573
573
|
/**
|
|
@@ -598,8 +598,8 @@ export interface McpUpdateParams {
|
|
|
598
598
|
*/
|
|
599
599
|
managed_auth_via_composio?: boolean;
|
|
600
600
|
/**
|
|
601
|
-
* Human-readable name to identify this MCP server instance (4-
|
|
602
|
-
* alphanumeric and hyphens only)
|
|
601
|
+
* Human-readable name to identify this MCP server instance (4-30 characters,
|
|
602
|
+
* alphanumeric, spaces, and hyphens only)
|
|
603
603
|
*/
|
|
604
604
|
name?: string;
|
|
605
605
|
/**
|
|
@@ -75,9 +75,9 @@ export declare namespace TriggersTypeRetrieveResponse {
|
|
|
75
75
|
*/
|
|
76
76
|
logo: string;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Slug of the toolkit
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
slug: string;
|
|
81
81
|
/**
|
|
82
82
|
* Unique identifier for the associated toolkit
|
|
83
83
|
*/
|
|
@@ -75,9 +75,9 @@ export declare namespace TriggersTypeRetrieveResponse {
|
|
|
75
75
|
*/
|
|
76
76
|
logo: string;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Slug of the toolkit
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
slug: string;
|
|
81
81
|
/**
|
|
82
82
|
* Unique identifier for the associated toolkit
|
|
83
83
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-execution.d.mts","sourceRoot":"","sources":["../../../src/resources/v3/internal/action-execution.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kCAAkC,CAAC;IAIjG;;;;;;;;;;OAUG;IACH,UAAU,CACR,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAGjD;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;IAEpB,GAAG,EAAE,kCAAkC,CAAC,GAAG,CAAC;IAE5C,UAAU,EAAE,kCAAkC,CAAC,UAAU,CAAC;IAE1D,OAAO,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE3C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAElC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,SAAS,GA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G;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,WAAW,CAAC,CAAC;IAEnE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,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,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-execution.d.ts","sourceRoot":"","sources":["../../../src/resources/v3/internal/action-execution.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kCAAkC,CAAC;IAIjG;;;;;;;;;;OAUG;IACH,UAAU,CACR,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAGjD;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;IAEpB,GAAG,EAAE,kCAAkC,CAAC,GAAG,CAAC;IAE5C,UAAU,EAAE,kCA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C;QAEf,kBAAkB,EAAE,MAAM,CAAC;QAE3B,SAAS,EAAE,MAAM,CAAC;QAElB,QAAQ,EAAE,MAAM,CAAC;QAEjB,aAAa,EAAE,MAAM,CAAC;QAEtB,eAAe,EAAE,MAAM,CAAC;QAExB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;KAC9B;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,GAAG;YAClB,IAAI,EAAE,MAAM,CAAC;YAEb,IAAI,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,WAAW,CAAC,CAAC;IAEnE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,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,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
package/src/client.ts
CHANGED
|
@@ -5,7 +5,6 @@ import type { HTTPMethod, PromiseOrValue, MergedRequestInit, FinalizedRequestIni
|
|
|
5
5
|
import { uuid4 } from './internal/utils/uuid';
|
|
6
6
|
import { validatePositiveInteger, isAbsoluteURL, safeJSON } from './internal/utils/values';
|
|
7
7
|
import { sleep } from './internal/utils/sleep';
|
|
8
|
-
import { type Logger, type LogLevel, parseLogLevel } from './internal/utils/log';
|
|
9
8
|
export type { Logger, LogLevel } from './internal/utils/log';
|
|
10
9
|
import { castToError, isAbortError } from './internal/errors';
|
|
11
10
|
import type { APIResponseProps } from './internal/parse';
|
|
@@ -96,7 +95,13 @@ import {
|
|
|
96
95
|
TriggersTypes,
|
|
97
96
|
} from './resources/triggers-types';
|
|
98
97
|
import { readEnv } from './internal/utils/env';
|
|
99
|
-
import {
|
|
98
|
+
import {
|
|
99
|
+
type LogLevel,
|
|
100
|
+
type Logger,
|
|
101
|
+
formatRequestDetails,
|
|
102
|
+
loggerFor,
|
|
103
|
+
parseLogLevel,
|
|
104
|
+
} from './internal/utils/log';
|
|
100
105
|
import { isEmptyObj } from './internal/utils/values';
|
|
101
106
|
import {
|
|
102
107
|
Mcp,
|
|
@@ -300,6 +305,13 @@ export class Composio {
|
|
|
300
305
|
});
|
|
301
306
|
}
|
|
302
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Check whether the base URL is set to its default.
|
|
310
|
+
*/
|
|
311
|
+
#baseURLOverridden(): boolean {
|
|
312
|
+
return this.baseURL !== environments[this._options.environment || 'production'];
|
|
313
|
+
}
|
|
314
|
+
|
|
303
315
|
protected defaultQuery(): Record<string, string | undefined> | undefined {
|
|
304
316
|
return this._options.defaultQuery;
|
|
305
317
|
}
|
|
@@ -345,11 +357,16 @@ export class Composio {
|
|
|
345
357
|
return Errors.APIError.generate(status, error, message, headers);
|
|
346
358
|
}
|
|
347
359
|
|
|
348
|
-
buildURL(
|
|
360
|
+
buildURL(
|
|
361
|
+
path: string,
|
|
362
|
+
query: Record<string, unknown> | null | undefined,
|
|
363
|
+
defaultBaseURL?: string | undefined,
|
|
364
|
+
): string {
|
|
365
|
+
const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL;
|
|
349
366
|
const url =
|
|
350
367
|
isAbsoluteURL(path) ?
|
|
351
368
|
new URL(path)
|
|
352
|
-
: new URL(
|
|
369
|
+
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
353
370
|
|
|
354
371
|
const defaultQuery = this.defaultQuery();
|
|
355
372
|
if (!isEmptyObj(defaultQuery)) {
|
|
@@ -690,9 +707,9 @@ export class Composio {
|
|
|
690
707
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
691
708
|
): { req: FinalizedRequestInit; url: string; timeout: number } {
|
|
692
709
|
const options = { ...inputOptions };
|
|
693
|
-
const { method, path, query } = options;
|
|
710
|
+
const { method, path, query, defaultBaseURL } = options;
|
|
694
711
|
|
|
695
|
-
const url = this.buildURL(path!, query as Record<string, unknown
|
|
712
|
+
const url = this.buildURL(path!, query as Record<string, unknown>, defaultBaseURL);
|
|
696
713
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
697
714
|
options.timeout = options.timeout ?? this.timeout;
|
|
698
715
|
const { bodyHeaders, body } = this.buildBody({ options });
|
package/src/core/resource.ts
CHANGED
package/src/internal/headers.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isReadonlyArray } from './utils/values';
|
|
4
|
+
|
|
3
5
|
type HeaderValue = string | undefined | null;
|
|
4
6
|
export type HeadersLike =
|
|
5
7
|
| Headers
|
|
@@ -9,7 +11,7 @@ export type HeadersLike =
|
|
|
9
11
|
| null
|
|
10
12
|
| NullableHeaders;
|
|
11
13
|
|
|
12
|
-
const brand_privateNullableHeaders = Symbol('brand.privateNullableHeaders');
|
|
14
|
+
const brand_privateNullableHeaders = /* @__PURE__ */ Symbol('brand.privateNullableHeaders');
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* @internal
|
|
@@ -25,8 +27,6 @@ export type NullableHeaders = {
|
|
|
25
27
|
nulls: Set<string>;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
|
-
const isArray = Array.isArray as (val: unknown) => val is readonly unknown[];
|
|
29
|
-
|
|
30
30
|
function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [string, string | null]> {
|
|
31
31
|
if (!headers) return;
|
|
32
32
|
|
|
@@ -43,7 +43,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
|
43
43
|
let iter: Iterable<readonly (HeaderValue | readonly HeaderValue[])[]>;
|
|
44
44
|
if (headers instanceof Headers) {
|
|
45
45
|
iter = headers.entries();
|
|
46
|
-
} else if (
|
|
46
|
+
} else if (isReadonlyArray(headers)) {
|
|
47
47
|
iter = headers;
|
|
48
48
|
} else {
|
|
49
49
|
shouldClear = true;
|
|
@@ -52,7 +52,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
|
52
52
|
for (let row of iter) {
|
|
53
53
|
const name = row[0];
|
|
54
54
|
if (typeof name !== 'string') throw new TypeError('expected header name to be a string');
|
|
55
|
-
const values =
|
|
55
|
+
const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];
|
|
56
56
|
let didClear = false;
|
|
57
57
|
for (const value of values) {
|
|
58
58
|
if (value === undefined) continue;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Format } from './types';
|
|
2
2
|
|
|
3
3
|
export const default_format: Format = 'RFC3986';
|
|
4
|
+
export const default_formatter = (v: PropertyKey) => String(v);
|
|
4
5
|
export const formatters: Record<Format, (str: PropertyKey) => string> = {
|
|
5
6
|
RFC1738: (v: PropertyKey) => String(v).replace(/%20/g, '+'),
|
|
6
|
-
RFC3986:
|
|
7
|
+
RFC3986: default_formatter,
|
|
7
8
|
};
|
|
8
9
|
export const RFC1738 = 'RFC1738';
|
|
9
10
|
export const RFC3986 = 'RFC3986';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { encode, is_buffer, maybe_map } from './utils';
|
|
2
|
-
import { default_format, formatters } from './formats';
|
|
1
|
+
import { encode, is_buffer, maybe_map, has } from './utils';
|
|
2
|
+
import { default_format, default_formatter, formatters } from './formats';
|
|
3
3
|
import type { NonNullableProperties, StringifyOptions } from './types';
|
|
4
|
-
|
|
5
|
-
const has = Object.prototype.hasOwnProperty;
|
|
4
|
+
import { isArray } from '../utils/values';
|
|
6
5
|
|
|
7
6
|
const array_prefix_generators = {
|
|
8
7
|
brackets(prefix: PropertyKey) {
|
|
@@ -17,13 +16,11 @@ const array_prefix_generators = {
|
|
|
17
16
|
},
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
const is_array = Array.isArray;
|
|
21
|
-
const push = Array.prototype.push;
|
|
22
19
|
const push_to_array = function (arr: any[], value_or_array: any) {
|
|
23
|
-
push.apply(arr,
|
|
20
|
+
Array.prototype.push.apply(arr, isArray(value_or_array) ? value_or_array : [value_or_array]);
|
|
24
21
|
};
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
let toISOString;
|
|
27
24
|
|
|
28
25
|
const defaults = {
|
|
29
26
|
addQueryPrefix: false,
|
|
@@ -38,11 +35,11 @@ const defaults = {
|
|
|
38
35
|
encoder: encode,
|
|
39
36
|
encodeValuesOnly: false,
|
|
40
37
|
format: default_format,
|
|
41
|
-
formatter:
|
|
38
|
+
formatter: default_formatter,
|
|
42
39
|
/** @deprecated */
|
|
43
40
|
indices: false,
|
|
44
41
|
serializeDate(date) {
|
|
45
|
-
return
|
|
42
|
+
return (toISOString ??= Function.prototype.call.bind(Date.prototype.toISOString))(date);
|
|
46
43
|
},
|
|
47
44
|
skipNulls: false,
|
|
48
45
|
strictNullHandling: false,
|
|
@@ -105,7 +102,7 @@ function inner_stringify(
|
|
|
105
102
|
obj = filter(prefix, obj);
|
|
106
103
|
} else if (obj instanceof Date) {
|
|
107
104
|
obj = serializeDate?.(obj);
|
|
108
|
-
} else if (generateArrayPrefix === 'comma' &&
|
|
105
|
+
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
109
106
|
obj = maybe_map(obj, function (value) {
|
|
110
107
|
if (value instanceof Date) {
|
|
111
108
|
return serializeDate?.(value);
|
|
@@ -148,14 +145,14 @@ function inner_stringify(
|
|
|
148
145
|
}
|
|
149
146
|
|
|
150
147
|
let obj_keys;
|
|
151
|
-
if (generateArrayPrefix === 'comma' &&
|
|
148
|
+
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
152
149
|
// we need to join elements in
|
|
153
150
|
if (encodeValuesOnly && encoder) {
|
|
154
151
|
// @ts-expect-error values only
|
|
155
152
|
obj = maybe_map(obj, encoder);
|
|
156
153
|
}
|
|
157
154
|
obj_keys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
158
|
-
} else if (
|
|
155
|
+
} else if (isArray(filter)) {
|
|
159
156
|
obj_keys = filter;
|
|
160
157
|
} else {
|
|
161
158
|
const keys = Object.keys(obj);
|
|
@@ -165,9 +162,9 @@ function inner_stringify(
|
|
|
165
162
|
const encoded_prefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
|
|
166
163
|
|
|
167
164
|
const adjusted_prefix =
|
|
168
|
-
commaRoundTrip &&
|
|
165
|
+
commaRoundTrip && isArray(obj) && obj.length === 1 ? encoded_prefix + '[]' : encoded_prefix;
|
|
169
166
|
|
|
170
|
-
if (allowEmptyArrays &&
|
|
167
|
+
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
|
|
171
168
|
return adjusted_prefix + '[]';
|
|
172
169
|
}
|
|
173
170
|
|
|
@@ -184,7 +181,7 @@ function inner_stringify(
|
|
|
184
181
|
// @ts-ignore
|
|
185
182
|
const encoded_key = allowDots && encodeDotInKeys ? (key as any).replace(/\./g, '%2E') : key;
|
|
186
183
|
const key_prefix =
|
|
187
|
-
|
|
184
|
+
isArray(obj) ?
|
|
188
185
|
typeof generateArrayPrefix === 'function' ?
|
|
189
186
|
generateArrayPrefix(adjusted_prefix, encoded_key)
|
|
190
187
|
: adjusted_prefix
|
|
@@ -205,7 +202,7 @@ function inner_stringify(
|
|
|
205
202
|
skipNulls,
|
|
206
203
|
encodeDotInKeys,
|
|
207
204
|
// @ts-ignore
|
|
208
|
-
generateArrayPrefix === 'comma' && encodeValuesOnly &&
|
|
205
|
+
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
|
|
209
206
|
filter,
|
|
210
207
|
sort,
|
|
211
208
|
allowDots,
|
|
@@ -244,7 +241,7 @@ function normalize_stringify_options(
|
|
|
244
241
|
|
|
245
242
|
let format = default_format;
|
|
246
243
|
if (typeof opts.format !== 'undefined') {
|
|
247
|
-
if (!has
|
|
244
|
+
if (!has(formatters, opts.format)) {
|
|
248
245
|
throw new TypeError('Unknown format option provided.');
|
|
249
246
|
}
|
|
250
247
|
format = opts.format;
|
|
@@ -252,7 +249,7 @@ function normalize_stringify_options(
|
|
|
252
249
|
const formatter = formatters[format];
|
|
253
250
|
|
|
254
251
|
let filter = defaults.filter;
|
|
255
|
-
if (typeof opts.filter === 'function' ||
|
|
252
|
+
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
|
256
253
|
filter = opts.filter;
|
|
257
254
|
}
|
|
258
255
|
|
|
@@ -316,7 +313,7 @@ export function stringify(object: any, opts: StringifyOptions = {}) {
|
|
|
316
313
|
if (typeof options.filter === 'function') {
|
|
317
314
|
filter = options.filter;
|
|
318
315
|
obj = filter('', obj);
|
|
319
|
-
} else if (
|
|
316
|
+
} else if (isArray(options.filter)) {
|
|
320
317
|
filter = options.filter;
|
|
321
318
|
obj_keys = filter;
|
|
322
319
|
}
|
package/src/internal/qs/utils.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { RFC1738 } from './formats';
|
|
2
2
|
import type { DefaultEncoder, Format } from './types';
|
|
3
|
+
import { isArray } from '../utils/values';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
export let has = (obj: object, key: PropertyKey): boolean => (
|
|
6
|
+
(has = (Object as any).hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty)),
|
|
7
|
+
has(obj, key)
|
|
8
|
+
);
|
|
6
9
|
|
|
7
|
-
const hex_table = (() => {
|
|
10
|
+
const hex_table = /* @__PURE__ */ (() => {
|
|
8
11
|
const array = [];
|
|
9
12
|
for (let i = 0; i < 256; ++i) {
|
|
10
13
|
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
@@ -20,7 +23,7 @@ function compact_queue<T extends Record<string, any>>(queue: Array<{ obj: T; pro
|
|
|
20
23
|
|
|
21
24
|
const obj = item.obj[item.prop];
|
|
22
25
|
|
|
23
|
-
if (
|
|
26
|
+
if (isArray(obj)) {
|
|
24
27
|
const compacted: unknown[] = [];
|
|
25
28
|
|
|
26
29
|
for (let j = 0; j < obj.length; ++j) {
|
|
@@ -56,13 +59,10 @@ export function merge(
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
if (typeof source !== 'object') {
|
|
59
|
-
if (
|
|
62
|
+
if (isArray(target)) {
|
|
60
63
|
target.push(source);
|
|
61
64
|
} else if (target && typeof target === 'object') {
|
|
62
|
-
if (
|
|
63
|
-
(options && (options.plainObjects || options.allowPrototypes)) ||
|
|
64
|
-
!has.call(Object.prototype, source)
|
|
65
|
-
) {
|
|
65
|
+
if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) {
|
|
66
66
|
target[source] = true;
|
|
67
67
|
}
|
|
68
68
|
} else {
|
|
@@ -77,14 +77,14 @@ export function merge(
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
let mergeTarget = target;
|
|
80
|
-
if (
|
|
80
|
+
if (isArray(target) && !isArray(source)) {
|
|
81
81
|
// @ts-ignore
|
|
82
82
|
mergeTarget = array_to_object(target, options);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
if (
|
|
85
|
+
if (isArray(target) && isArray(source)) {
|
|
86
86
|
source.forEach(function (item, i) {
|
|
87
|
-
if (has
|
|
87
|
+
if (has(target, i)) {
|
|
88
88
|
const targetItem = target[i];
|
|
89
89
|
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
90
90
|
target[i] = merge(targetItem, item, options);
|
|
@@ -101,7 +101,7 @@ export function merge(
|
|
|
101
101
|
return Object.keys(source).reduce(function (acc, key) {
|
|
102
102
|
const value = source[key];
|
|
103
103
|
|
|
104
|
-
if (has
|
|
104
|
+
if (has(acc, key)) {
|
|
105
105
|
acc[key] = merge(acc[key], value, options);
|
|
106
106
|
} else {
|
|
107
107
|
acc[key] = value;
|
|
@@ -254,7 +254,7 @@ export function combine(a: any, b: any) {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
export function maybe_map<T>(val: T[], fn: (v: T) => T) {
|
|
257
|
-
if (
|
|
257
|
+
if (isArray(val)) {
|
|
258
258
|
const mapped = [];
|
|
259
259
|
for (let i = 0; i < val.length; i += 1) {
|
|
260
260
|
mapped.push(fn(val[i]!));
|
package/src/internal/uploads.ts
CHANGED
|
@@ -90,7 +90,7 @@ export const multipartFormRequestOptions = async (
|
|
|
90
90
|
return { ...opts, body: await createForm(opts.body, fetch) };
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
const supportsFormDataMap = new WeakMap<Fetch, Promise<boolean>>();
|
|
93
|
+
const supportsFormDataMap = /** @__PURE__ */ new WeakMap<Fetch, Promise<boolean>>();
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* node-fetch doesn't support the global FormData object in recent node versions. Instead of sending
|
|
@@ -58,7 +58,7 @@ const noopLogger = {
|
|
|
58
58
|
debug: noop,
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
let cachedLoggers = new WeakMap<Logger, [LogLevel, Logger]>();
|
|
61
|
+
let cachedLoggers = /** @__PURE__ */ new WeakMap<Logger, [LogLevel, Logger]>();
|
|
62
62
|
|
|
63
63
|
export function loggerFor(client: Composio): Logger {
|
|
64
64
|
const logger = client.logger;
|
|
@@ -60,4 +60,4 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
|
|
60
60
|
/**
|
|
61
61
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
62
62
|
*/
|
|
63
|
-
export const path = createPathTagFunction(encodeURIPath);
|
|
63
|
+
export const path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
@@ -9,6 +9,9 @@ export const isAbsoluteURL = (url: string): boolean => {
|
|
|
9
9
|
return startsWithSchemeRegexp.test(url);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
+
export let isArray = (val: unknown): val is unknown[] => ((isArray = Array.isArray), isArray(val));
|
|
13
|
+
export let isReadonlyArray = isArray as (val: unknown) => val is readonly unknown[];
|
|
14
|
+
|
|
12
15
|
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
13
16
|
export function maybeObj(x: unknown): object {
|
|
14
17
|
if (typeof x !== 'object') {
|
|
@@ -2685,7 +2685,7 @@ export interface ConnectedAccountRetrieveResponse {
|
|
|
2685
2685
|
/**
|
|
2686
2686
|
* The status of the connection
|
|
2687
2687
|
*/
|
|
2688
|
-
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
2688
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE';
|
|
2689
2689
|
|
|
2690
2690
|
/**
|
|
2691
2691
|
* The reason the connection is disabled
|
|
@@ -5299,7 +5299,7 @@ export namespace ConnectedAccountListResponse {
|
|
|
5299
5299
|
/**
|
|
5300
5300
|
* The status of the connection
|
|
5301
5301
|
*/
|
|
5302
|
-
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
5302
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE';
|
|
5303
5303
|
|
|
5304
5304
|
/**
|
|
5305
5305
|
* The reason the connection is disabled
|
|
@@ -7895,7 +7895,7 @@ export interface ConnectedAccountRefreshResponse {
|
|
|
7895
7895
|
/**
|
|
7896
7896
|
* The current status of the connected account (e.g., active, pending, failed)
|
|
7897
7897
|
*/
|
|
7898
|
-
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
7898
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE';
|
|
7899
7899
|
}
|
|
7900
7900
|
|
|
7901
7901
|
/**
|
|
@@ -10479,7 +10479,7 @@ export interface ConnectedAccountListParams {
|
|
|
10479
10479
|
/**
|
|
10480
10480
|
* The status of the connected account
|
|
10481
10481
|
*/
|
|
10482
|
-
statuses?: Array<'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED'> | null;
|
|
10482
|
+
statuses?: Array<'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE'> | null;
|
|
10483
10483
|
|
|
10484
10484
|
/**
|
|
10485
10485
|
* The toolkit slugs of the connected accounts
|
|
@@ -86,8 +86,8 @@ export namespace CustomCreateResponse {
|
|
|
86
86
|
|
|
87
87
|
export interface CustomCreateParams {
|
|
88
88
|
/**
|
|
89
|
-
* Human-readable name to identify this custom MCP server (4-
|
|
90
|
-
* alphanumeric and hyphens only)
|
|
89
|
+
* Human-readable name to identify this custom MCP server (4-30 characters,
|
|
90
|
+
* alphanumeric, spaces, and hyphens only)
|
|
91
91
|
*/
|
|
92
92
|
name: string;
|
|
93
93
|
|
package/src/resources/mcp/mcp.ts
CHANGED
|
@@ -697,8 +697,8 @@ export namespace McpValidateResponse {
|
|
|
697
697
|
|
|
698
698
|
export interface McpCreateParams {
|
|
699
699
|
/**
|
|
700
|
-
* Human-readable name to identify this MCP server instance (4-
|
|
701
|
-
* alphanumeric and hyphens only)
|
|
700
|
+
* Human-readable name to identify this MCP server instance (4-30 characters,
|
|
701
|
+
* alphanumeric, spaces, and hyphens only)
|
|
702
702
|
*/
|
|
703
703
|
name: string;
|
|
704
704
|
|
|
@@ -736,8 +736,8 @@ export interface McpUpdateParams {
|
|
|
736
736
|
managed_auth_via_composio?: boolean;
|
|
737
737
|
|
|
738
738
|
/**
|
|
739
|
-
* Human-readable name to identify this MCP server instance (4-
|
|
740
|
-
* alphanumeric and hyphens only)
|
|
739
|
+
* Human-readable name to identify this MCP server instance (4-30 characters,
|
|
740
|
+
* alphanumeric, spaces, and hyphens only)
|
|
741
741
|
*/
|
|
742
742
|
name?: string;
|
|
743
743
|
|
|
@@ -99,9 +99,9 @@ export namespace TriggersTypeRetrieveResponse {
|
|
|
99
99
|
logo: string;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* Slug of the toolkit
|
|
103
103
|
*/
|
|
104
|
-
|
|
104
|
+
slug: string;
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* Unique identifier for the associated toolkit
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.23'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.23";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.23";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|