@caitlyn-ai/sdk 0.0.2 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -7
- package/dist-browser/sdk/index.mjs +59 -33
- package/dist-browser/sdk/index.mjs.map +3 -3
- package/dist-cjs/sdk/index.cjs +59 -32
- package/dist-cjs/sdk/index.cjs.map +3 -3
- package/dist-es/sdk/index.mjs +59 -33
- package/dist-es/sdk/index.mjs.map +3 -3
- package/dist-types/sdk/index.d.ts +5376 -8
- package/package.json +2 -3
- package/dist-types/Caitlyn.d.ts +0 -76
- package/dist-types/CaitlynClient.d.ts +0 -160
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +0 -29
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +0 -81
- package/dist-types/commandBuilder.d.ts +0 -18
- package/dist-types/commands/CreateDocumentCommand.d.ts +0 -190
- package/dist-types/commands/CreateUploadCommand.d.ts +0 -165
- package/dist-types/commands/GetAgentVersionCommand.d.ts +0 -177
- package/dist-types/commands/ListDocumentsCommand.d.ts +0 -176
- package/dist-types/commands/ResumeConversationStreamCommand.d.ts +0 -146
- package/dist-types/commands/SendMessageCommand.d.ts +0 -183
- package/dist-types/commands/UpdateDraftVersionCommand.d.ts +0 -202
- package/dist-types/commands/index.d.ts +0 -7
- package/dist-types/endpoint/EndpointParameters.d.ts +0 -32
- package/dist-types/endpoint/bdd.d.ts +0 -2
- package/dist-types/endpoint/endpointResolver.d.ts +0 -8
- package/dist-types/extensionConfiguration.d.ts +0 -8
- package/dist-types/index.d.ts +0 -22
- package/dist-types/models/CaitlynServiceException.d.ts +0 -15
- package/dist-types/models/enums.d.ts +0 -148
- package/dist-types/models/errors.d.ts +0 -659
- package/dist-types/models/models_0.d.ts +0 -754
- package/dist-types/pagination/Interfaces.d.ts +0 -8
- package/dist-types/pagination/ListDocumentsPaginator.d.ts +0 -7
- package/dist-types/pagination/index.d.ts +0 -2
- package/dist-types/runtimeConfig.browser.d.ts +0 -50
- package/dist-types/runtimeConfig.d.ts +0 -50
- package/dist-types/runtimeConfig.native.d.ts +0 -49
- package/dist-types/runtimeConfig.shared.d.ts +0 -36
- package/dist-types/runtimeExtensions.d.ts +0 -17
- package/dist-types/schemas/schemas_0.d.ts +0 -51
- package/dist-types/sdk/client.d.ts +0 -47
- package/dist-types/sdk/events.d.ts +0 -163
- package/dist-types/sdk/operations.d.ts +0 -70
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Paginator } from "@smithy/types";
|
|
2
|
-
import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "../commands/ListDocumentsCommand";
|
|
3
|
-
import type { CaitlynPaginationConfiguration } from "./Interfaces";
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare const paginateListDocuments: (config: CaitlynPaginationConfiguration, input: ListDocumentsCommandInput, ...rest: any[]) => Paginator<ListDocumentsCommandOutput>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
|
|
2
|
-
import type { CaitlynClientConfig } from "./CaitlynClient";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare const getRuntimeConfig: (config: CaitlynClientConfig) => {
|
|
7
|
-
runtime: string;
|
|
8
|
-
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
9
|
-
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
10
|
-
requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
|
|
11
|
-
retryMode: string | import("@smithy/types").Provider<string>;
|
|
12
|
-
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
13
|
-
cacheMiddleware?: boolean | undefined;
|
|
14
|
-
protocol: typeof import("@caitlyn-ai/sdk-core").CaitlynRestJsonProtocol | import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any>;
|
|
15
|
-
protocolSettings: {
|
|
16
|
-
defaultNamespace?: string;
|
|
17
|
-
[setting: string]: unknown;
|
|
18
|
-
};
|
|
19
|
-
apiVersion: string;
|
|
20
|
-
sha256: any;
|
|
21
|
-
urlParser: import("@smithy/types").UrlParser;
|
|
22
|
-
base64Decoder: import("@smithy/types").Decoder;
|
|
23
|
-
base64Encoder: (_input: Uint8Array | string) => string;
|
|
24
|
-
utf8Decoder: import("@smithy/types").Decoder;
|
|
25
|
-
utf8Encoder: (input: Uint8Array | string) => string;
|
|
26
|
-
disableHostPrefix: boolean;
|
|
27
|
-
logger: import("@smithy/types").Logger;
|
|
28
|
-
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
29
|
-
defaultsMode?: import("@smithy/core/client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/core/client").DefaultsMode>;
|
|
30
|
-
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
31
|
-
caitlynSdkVersion: string;
|
|
32
|
-
retryStrategy: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
33
|
-
endpoint: (string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined) & ((string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<string> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined));
|
|
34
|
-
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
35
|
-
logger?: import("@smithy/types").Logger;
|
|
36
|
-
}) => import("@smithy/types").EndpointV2;
|
|
37
|
-
tls?: boolean;
|
|
38
|
-
useDualstackEndpoint?: boolean | import("@smithy/types").Provider<boolean | undefined>;
|
|
39
|
-
useFipsEndpoint?: boolean | import("@smithy/types").Provider<boolean | undefined>;
|
|
40
|
-
ignoreConfiguredEndpointUrls?: boolean;
|
|
41
|
-
serviceConfiguredEndpoint?: never;
|
|
42
|
-
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
|
|
43
|
-
httpAuthSchemes: {
|
|
44
|
-
schemeId: string;
|
|
45
|
-
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
|
46
|
-
signer: import("@smithy/core").HttpBearerAuthSigner;
|
|
47
|
-
}[];
|
|
48
|
-
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").CaitlynHttpAuthSchemeProvider;
|
|
49
|
-
token?: import("@smithy/types").TokenIdentity | import("@smithy/types").TokenIdentityProvider;
|
|
50
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
|
|
2
|
-
import type { CaitlynClientConfig } from "./CaitlynClient";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare const getRuntimeConfig: (config: CaitlynClientConfig) => {
|
|
7
|
-
runtime: string;
|
|
8
|
-
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
9
|
-
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
10
|
-
requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
|
|
11
|
-
retryMode: string | import("@smithy/types").Provider<string>;
|
|
12
|
-
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
13
|
-
cacheMiddleware?: boolean | undefined;
|
|
14
|
-
protocol: typeof import("@caitlyn-ai/sdk-core").CaitlynRestJsonProtocol | import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any>;
|
|
15
|
-
protocolSettings: {
|
|
16
|
-
defaultNamespace?: string;
|
|
17
|
-
[setting: string]: unknown;
|
|
18
|
-
};
|
|
19
|
-
apiVersion: string;
|
|
20
|
-
sha256: any;
|
|
21
|
-
urlParser: import("@smithy/types").UrlParser;
|
|
22
|
-
base64Decoder: import("@smithy/types").Decoder;
|
|
23
|
-
base64Encoder: (_input: Uint8Array | string) => string;
|
|
24
|
-
utf8Decoder: import("@smithy/types").Decoder;
|
|
25
|
-
utf8Encoder: (input: Uint8Array | string) => string;
|
|
26
|
-
disableHostPrefix: boolean;
|
|
27
|
-
logger: import("@smithy/types").Logger;
|
|
28
|
-
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
29
|
-
defaultsMode?: import("@smithy/core/client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/core/client").DefaultsMode>;
|
|
30
|
-
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
31
|
-
caitlynSdkVersion: string;
|
|
32
|
-
retryStrategy: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
33
|
-
endpoint: (string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined) & ((string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<string> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined));
|
|
34
|
-
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
35
|
-
logger?: import("@smithy/types").Logger;
|
|
36
|
-
}) => import("@smithy/types").EndpointV2;
|
|
37
|
-
tls?: boolean;
|
|
38
|
-
useDualstackEndpoint?: boolean | import("@smithy/types").Provider<boolean | undefined>;
|
|
39
|
-
useFipsEndpoint?: boolean | import("@smithy/types").Provider<boolean | undefined>;
|
|
40
|
-
ignoreConfiguredEndpointUrls?: boolean;
|
|
41
|
-
serviceConfiguredEndpoint?: never;
|
|
42
|
-
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
|
|
43
|
-
httpAuthSchemes: {
|
|
44
|
-
schemeId: string;
|
|
45
|
-
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
|
46
|
-
signer: import("@smithy/core").HttpBearerAuthSigner;
|
|
47
|
-
}[];
|
|
48
|
-
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").CaitlynHttpAuthSchemeProvider;
|
|
49
|
-
token?: import("@smithy/types").TokenIdentity | import("@smithy/types").TokenIdentityProvider;
|
|
50
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { CaitlynClientConfig } from "./CaitlynClient";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const getRuntimeConfig: (config: CaitlynClientConfig) => {
|
|
6
|
-
runtime: string;
|
|
7
|
-
requestHandler: Record<string, unknown> | import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | import("@smithy/core/protocols").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
8
|
-
cacheMiddleware?: boolean;
|
|
9
|
-
protocol: typeof import("@caitlyn-ai/sdk-core").CaitlynRestJsonProtocol | import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any>;
|
|
10
|
-
protocolSettings: {
|
|
11
|
-
defaultNamespace?: string;
|
|
12
|
-
[setting: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
apiVersion: string;
|
|
15
|
-
sha256: any;
|
|
16
|
-
urlParser: import("@smithy/types").UrlParser;
|
|
17
|
-
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
18
|
-
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
19
|
-
base64Decoder: import("@smithy/types").Decoder;
|
|
20
|
-
base64Encoder: (_input: Uint8Array | string) => string;
|
|
21
|
-
utf8Decoder: import("@smithy/types").Decoder;
|
|
22
|
-
utf8Encoder: (input: Uint8Array | string) => string;
|
|
23
|
-
disableHostPrefix: boolean;
|
|
24
|
-
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
25
|
-
retryMode: string | import("@smithy/types").Provider<string>;
|
|
26
|
-
logger: import("@smithy/types").Logger;
|
|
27
|
-
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
28
|
-
defaultsMode?: import("@smithy/core/client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/core/client").DefaultsMode>;
|
|
29
|
-
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
30
|
-
caitlynSdkVersion: string;
|
|
31
|
-
retryStrategy: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
32
|
-
endpoint: (string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined) & ((string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").EndpointV2 | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<string> | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined));
|
|
33
|
-
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
34
|
-
logger?: import("@smithy/types").Logger;
|
|
35
|
-
}) => import("@smithy/types").EndpointV2;
|
|
36
|
-
tls?: boolean;
|
|
37
|
-
useDualstackEndpoint?: boolean | import("@smithy/types").Provider<boolean | undefined>;
|
|
38
|
-
useFipsEndpoint?: boolean | import("@smithy/types").Provider<boolean | undefined>;
|
|
39
|
-
ignoreConfiguredEndpointUrls?: boolean;
|
|
40
|
-
serviceConfiguredEndpoint?: never;
|
|
41
|
-
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
|
|
42
|
-
httpAuthSchemes: {
|
|
43
|
-
schemeId: string;
|
|
44
|
-
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
|
45
|
-
signer: import("@smithy/core").HttpBearerAuthSigner;
|
|
46
|
-
}[];
|
|
47
|
-
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").CaitlynHttpAuthSchemeProvider;
|
|
48
|
-
token?: import("@smithy/types").TokenIdentity | import("@smithy/types").TokenIdentityProvider;
|
|
49
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { CaitlynRestJsonProtocol } from "@caitlyn-ai/sdk-core";
|
|
2
|
-
import { HttpBearerAuthSigner } from "@smithy/core";
|
|
3
|
-
import type { IdentityProviderConfig } from "@smithy/types";
|
|
4
|
-
import type { CaitlynClientConfig } from "./CaitlynClient";
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare const getRuntimeConfig: (config: CaitlynClientConfig) => {
|
|
9
|
-
apiVersion: string;
|
|
10
|
-
base64Decoder: import("@smithy/types").Decoder;
|
|
11
|
-
base64Encoder: (_input: Uint8Array | string) => string;
|
|
12
|
-
caitlynSdkVersion: string;
|
|
13
|
-
disableHostPrefix: boolean;
|
|
14
|
-
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
15
|
-
logger?: import("@smithy/types").Logger;
|
|
16
|
-
}) => import("@smithy/types").EndpointV2;
|
|
17
|
-
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
18
|
-
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").CaitlynHttpAuthSchemeProvider;
|
|
19
|
-
httpAuthSchemes: {
|
|
20
|
-
schemeId: string;
|
|
21
|
-
identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
|
22
|
-
signer: HttpBearerAuthSigner;
|
|
23
|
-
}[];
|
|
24
|
-
logger: import("@smithy/types").Logger;
|
|
25
|
-
protocol: typeof CaitlynRestJsonProtocol | import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any>;
|
|
26
|
-
protocolSettings: {
|
|
27
|
-
[setting: string]: unknown;
|
|
28
|
-
defaultNamespace?: string;
|
|
29
|
-
};
|
|
30
|
-
retryStrategy: import("@smithy/types").RetryStrategyV2 | import("@smithy/types").RetryStrategy;
|
|
31
|
-
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
32
|
-
sha256: any;
|
|
33
|
-
urlParser: import("@smithy/types").UrlParser;
|
|
34
|
-
utf8Decoder: import("@smithy/types").Decoder;
|
|
35
|
-
utf8Encoder: (input: Uint8Array | string) => string;
|
|
36
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { CaitlynExtensionConfiguration } from "./extensionConfiguration";
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export interface RuntimeExtension {
|
|
6
|
-
configure(extensionConfiguration: CaitlynExtensionConfiguration): void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export interface RuntimeExtensionsConfig {
|
|
12
|
-
extensions: RuntimeExtension[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { TypeRegistry } from "@smithy/core/schema";
|
|
2
|
-
import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
|
|
3
|
-
export declare var CaitlynServiceException$: StaticErrorSchema;
|
|
4
|
-
export declare var ConflictError$: StaticErrorSchema;
|
|
5
|
-
export declare var InternalError$: StaticErrorSchema;
|
|
6
|
-
export declare var NotFoundError$: StaticErrorSchema;
|
|
7
|
-
export declare var PayloadTooLargeError$: StaticErrorSchema;
|
|
8
|
-
export declare var PermissionDeniedError$: StaticErrorSchema;
|
|
9
|
-
export declare var PreconditionFailedError$: StaticErrorSchema;
|
|
10
|
-
export declare var PreconditionRequiredError$: StaticErrorSchema;
|
|
11
|
-
export declare var ServiceUnavailableError$: StaticErrorSchema;
|
|
12
|
-
export declare var TooManyRequestsError$: StaticErrorSchema;
|
|
13
|
-
export declare var UnauthenticatedError$: StaticErrorSchema;
|
|
14
|
-
export declare var UnprocessableContentError$: StaticErrorSchema;
|
|
15
|
-
export declare var ValidationError$: StaticErrorSchema;
|
|
16
|
-
/**
|
|
17
|
-
* TypeRegistry instances containing modeled errors.
|
|
18
|
-
* @internal
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export declare const errorTypeRegistries: TypeRegistry[];
|
|
22
|
-
export declare var AgentConfiguration$: StaticStructureSchema;
|
|
23
|
-
export declare var AttachmentSettings$: StaticStructureSchema;
|
|
24
|
-
export declare var ContentSafety$: StaticStructureSchema;
|
|
25
|
-
export declare var ContextItem$: StaticStructureSchema;
|
|
26
|
-
export declare var CreateDocumentInput$: StaticStructureSchema;
|
|
27
|
-
export declare var CreateDocumentOutput$: StaticStructureSchema;
|
|
28
|
-
export declare var CreateUploadInput$: StaticStructureSchema;
|
|
29
|
-
export declare var CreateUploadOutput$: StaticStructureSchema;
|
|
30
|
-
export declare var Document$: StaticStructureSchema;
|
|
31
|
-
export declare var FieldError$: StaticStructureSchema;
|
|
32
|
-
export declare var GetAgentVersionInput$: StaticStructureSchema;
|
|
33
|
-
export declare var GetAgentVersionOutput$: StaticStructureSchema;
|
|
34
|
-
export declare var KnowledgeBaseBinding$: StaticStructureSchema;
|
|
35
|
-
export declare var ListDocumentsInput$: StaticStructureSchema;
|
|
36
|
-
export declare var ListDocumentsOutput$: StaticStructureSchema;
|
|
37
|
-
export declare var Operation$: StaticStructureSchema;
|
|
38
|
-
export declare var PartialFailure$: StaticStructureSchema;
|
|
39
|
-
export declare var ResumeConversationStreamInput$: StaticStructureSchema;
|
|
40
|
-
export declare var ResumeConversationStreamOutput$: StaticStructureSchema;
|
|
41
|
-
export declare var SendMessageInput$: StaticStructureSchema;
|
|
42
|
-
export declare var SendMessageOutput$: StaticStructureSchema;
|
|
43
|
-
export declare var UpdateDraftVersionInput$: StaticStructureSchema;
|
|
44
|
-
export declare var UpdateDraftVersionOutput$: StaticStructureSchema;
|
|
45
|
-
export declare var CreateDocument$: StaticOperationSchema;
|
|
46
|
-
export declare var CreateUpload$: StaticOperationSchema;
|
|
47
|
-
export declare var GetAgentVersion$: StaticOperationSchema;
|
|
48
|
-
export declare var ListDocuments$: StaticOperationSchema;
|
|
49
|
-
export declare var ResumeConversationStream$: StaticOperationSchema;
|
|
50
|
-
export declare var SendMessage$: StaticOperationSchema;
|
|
51
|
-
export declare var UpdateDraftVersion$: StaticOperationSchema;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { CaitlynClient } from "../CaitlynClient";
|
|
2
|
-
import { type AuthSession, type CaitlynOptions } from "@caitlyn-ai/sdk-core";
|
|
3
|
-
import * as ops from "./operations";
|
|
4
|
-
type Rest<F> = F extends (client: CaitlynClient, ...rest: infer R) => unknown ? R : never;
|
|
5
|
-
/** Creates the client the standalone operation functions take as their first argument. */
|
|
6
|
-
export declare function createCaitlynClient(options: CaitlynOptions, auth?: AuthSession): CaitlynClient;
|
|
7
|
-
/** Every operation, grouped by namespace. Import the standalone functions instead for the smallest bundle. */
|
|
8
|
-
export declare class Caitlyn {
|
|
9
|
-
readonly client: CaitlynClient;
|
|
10
|
-
/** The sign-in session: the current token, and the oauth mode's authorizationUrl(), handleCallback() and signOut(). */
|
|
11
|
-
readonly auth: AuthSession;
|
|
12
|
-
constructor(options: CaitlynOptions);
|
|
13
|
-
readonly conversations: {
|
|
14
|
-
resume: (conversationId: string, input: Omit<import("..").ResumeConversationStreamInput, "conversationId">, options?: import("@caitlyn-ai/sdk-core").CallOptions | undefined) => import("@caitlyn-ai/sdk-core").SseStream<import("./events").ConversationEvent, import("./events").Message>;
|
|
15
|
-
send: (conversationId: string, input: Omit<import("..").SendMessageInput, "conversationId">, options?: import("@caitlyn-ai/sdk-core").CallOptions | undefined) => import("@caitlyn-ai/sdk-core").SseStream<import("./events").ConversationEvent, import("./events").Message>;
|
|
16
|
-
};
|
|
17
|
-
readonly documents: {
|
|
18
|
-
create: (input: Omit<import("..").CreateDocumentInput, "idempotencyKey">, options?: (import("@caitlyn-ai/sdk-core").CallOptions & {
|
|
19
|
-
idempotencyKey?: string;
|
|
20
|
-
}) | undefined) => Promise<import("@caitlyn-ai/sdk-core").WithRaw<import("..").CreateDocumentOutput>>;
|
|
21
|
-
list: (input: import("..").ListDocumentsInput, options?: import("@caitlyn-ai/sdk-core").CallOptions | undefined) => AsyncIterable<import("@caitlyn-ai/sdk-core").WithRaw<import("..").Document>>;
|
|
22
|
-
upload: (input: {
|
|
23
|
-
file: Blob;
|
|
24
|
-
fileName: string;
|
|
25
|
-
} & Omit<import("..").CreateDocumentInput, "idempotencyKey" | "uploadId">, options?: (import("@caitlyn-ai/sdk-core").CallOptions & {
|
|
26
|
-
idempotencyKey?: string;
|
|
27
|
-
}) | undefined) => Promise<import("@caitlyn-ai/sdk-core").WithRaw<import("..").CreateDocumentOutput>>;
|
|
28
|
-
};
|
|
29
|
-
readonly uploads: {
|
|
30
|
-
create: (input: {
|
|
31
|
-
file: Blob;
|
|
32
|
-
fileName: string;
|
|
33
|
-
} & Omit<import("..").CreateUploadInput, "sha256" | "byteSize" | "contentType" | "fileName" | "idempotencyKey">, options?: (import("@caitlyn-ai/sdk-core").CallOptions & {
|
|
34
|
-
idempotencyKey?: string;
|
|
35
|
-
}) | undefined) => Promise<import("@caitlyn-ai/sdk-core").WithRaw<import("..").CreateUploadOutput>>;
|
|
36
|
-
reserve: (input: Omit<import("..").CreateUploadInput, "idempotencyKey">, options?: (import("@caitlyn-ai/sdk-core").CallOptions & {
|
|
37
|
-
idempotencyKey?: string;
|
|
38
|
-
}) | undefined) => Promise<import("@caitlyn-ai/sdk-core").WithRaw<import("..").CreateUploadOutput>>;
|
|
39
|
-
};
|
|
40
|
-
readonly versions: {
|
|
41
|
-
get: (input: import("..").GetAgentVersionInput, options?: import("@caitlyn-ai/sdk-core").CallOptions | undefined) => Promise<import("@caitlyn-ai/sdk-core").WithRaw<import("..").GetAgentVersionOutput>>;
|
|
42
|
-
updateDraft: (agentId: string, input: Omit<import("..").UpdateDraftVersionInput, "agentId" | "ifMatch">, options: import("@caitlyn-ai/sdk-core").CallOptions & {
|
|
43
|
-
ifMatch: string;
|
|
44
|
-
}) => Promise<import("@caitlyn-ai/sdk-core").WithRaw<import("..").UpdateDraftVersionOutput>>;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import type { FieldError } from "../models/models_0";
|
|
2
|
-
/** The events on a conversation's answer stream. The SSE `event:` name is each member's
|
|
3
|
-
* `@jsonName`. Clients skip event names they do not know. */
|
|
4
|
-
export type ConversationEvent = ({
|
|
5
|
-
type: "message.started";
|
|
6
|
-
eventId?: string;
|
|
7
|
-
} & MessageStarted) | ({
|
|
8
|
-
type: "phase.changed";
|
|
9
|
-
eventId?: string;
|
|
10
|
-
} & PhaseChanged) | ({
|
|
11
|
-
type: "progress.updated";
|
|
12
|
-
eventId?: string;
|
|
13
|
-
} & ProgressUpdated) | ({
|
|
14
|
-
type: "text.delta";
|
|
15
|
-
eventId?: string;
|
|
16
|
-
} & TextDelta) | ({
|
|
17
|
-
type: "citation.added";
|
|
18
|
-
eventId?: string;
|
|
19
|
-
} & CitationAdded) | ({
|
|
20
|
-
type: "tool.started";
|
|
21
|
-
eventId?: string;
|
|
22
|
-
} & ToolStarted) | ({
|
|
23
|
-
type: "tool.finished";
|
|
24
|
-
eventId?: string;
|
|
25
|
-
} & ToolFinished) | ({
|
|
26
|
-
type: "input.requested";
|
|
27
|
-
eventId?: string;
|
|
28
|
-
} & InputRequested) | ({
|
|
29
|
-
type: "message.completed";
|
|
30
|
-
eventId?: string;
|
|
31
|
-
} & MessageCompleted) | ({
|
|
32
|
-
type: "message.failed";
|
|
33
|
-
eventId?: string;
|
|
34
|
-
} & MessageFailed);
|
|
35
|
-
/** The SSE event names this SDK version knows; any other event is skipped. */
|
|
36
|
-
export declare const ConversationEventNames: ReadonlySet<string>;
|
|
37
|
-
/** A passage the answer cites. */
|
|
38
|
-
export interface Citation {
|
|
39
|
-
/** The citation's number in the answer text, starting at 1. */
|
|
40
|
-
number: number;
|
|
41
|
-
/** The cited document. */
|
|
42
|
-
documentId?: string;
|
|
43
|
-
/** The knowledge base the document is in. */
|
|
44
|
-
knowledgeBaseId?: string;
|
|
45
|
-
/** The cited document's name. */
|
|
46
|
-
documentName?: string;
|
|
47
|
-
/** The page the passage is on, starting at 1, for paged documents. */
|
|
48
|
-
pageNumber?: number;
|
|
49
|
-
}
|
|
50
|
-
/** The data of `citation.added`. */
|
|
51
|
-
export interface CitationAdded {
|
|
52
|
-
/** The passage the answer now cites. */
|
|
53
|
-
citation: Citation;
|
|
54
|
-
}
|
|
55
|
-
/** The data of `input.requested`. */
|
|
56
|
-
export interface InputRequested {
|
|
57
|
-
/** The widget the agent asks the person to fill in. */
|
|
58
|
-
widget?: unknown;
|
|
59
|
-
}
|
|
60
|
-
/** A message in a conversation. */
|
|
61
|
-
export interface Message {
|
|
62
|
-
/** The message's identifier. */
|
|
63
|
-
id: string;
|
|
64
|
-
/** Who wrote the message. */
|
|
65
|
-
role: MessageRole;
|
|
66
|
-
/** The message text. For an answer, the whole text the deltas built up. */
|
|
67
|
-
text: string;
|
|
68
|
-
/** The agent version that wrote an answer. */
|
|
69
|
-
agentVersion?: string;
|
|
70
|
-
/** The passages an answer cites, in citation number order. */
|
|
71
|
-
citations?: Citation[];
|
|
72
|
-
/** When the message was written. */
|
|
73
|
-
createdAt: string;
|
|
74
|
-
}
|
|
75
|
-
/** The data of `message.completed`. */
|
|
76
|
-
export interface MessageCompleted {
|
|
77
|
-
/** The complete answer message. */
|
|
78
|
-
message: Message;
|
|
79
|
-
}
|
|
80
|
-
/** The data of `message.failed`: a problem details object, exactly as an error response body. */
|
|
81
|
-
export interface MessageFailed {
|
|
82
|
-
/** A stable URI for the code: its page in the public error reference,
|
|
83
|
-
* `https://build.caitlyn.ai/errors/{code}`. */
|
|
84
|
-
type: string;
|
|
85
|
-
/** A short, human-readable summary of the problem, the same for every occurrence of the code. */
|
|
86
|
-
title: string;
|
|
87
|
-
/** The HTTP status code, repeated from the response. */
|
|
88
|
-
status: number;
|
|
89
|
-
/** The stable code, for example `NOT_FOUND`. Once shipped a code keeps its meaning and is never
|
|
90
|
-
* renamed; callers match on it. */
|
|
91
|
-
code: string;
|
|
92
|
-
/** What went wrong in this occurrence, written for the integrator. Never holds stack traces,
|
|
93
|
-
* storage keys or another person's data. */
|
|
94
|
-
detail?: string;
|
|
95
|
-
/** The request's identifier, the same value as the `Caitlyn-Request-Id` header. Quote it to
|
|
96
|
-
* support. */
|
|
97
|
-
requestId: string;
|
|
98
|
-
/** Field-level problems, one per member or parameter at fault. Present only on 400
|
|
99
|
-
* `VALIDATION_FAILED`. */
|
|
100
|
-
errors?: FieldError[];
|
|
101
|
-
}
|
|
102
|
-
/** Who wrote a message. Open: new values may be added. */
|
|
103
|
-
export type MessageRole = "user" | "assistant" | (string & {});
|
|
104
|
-
/** The data of `message.started`. */
|
|
105
|
-
export interface MessageStarted {
|
|
106
|
-
/** The answer message's identifier. */
|
|
107
|
-
messageId: string;
|
|
108
|
-
/** The agent version answering. */
|
|
109
|
-
agentVersion?: string;
|
|
110
|
-
/** The workflow phase the answer starts in, where the agent has phases. */
|
|
111
|
-
phase?: string;
|
|
112
|
-
}
|
|
113
|
-
/** The data of `phase.changed`. */
|
|
114
|
-
export interface PhaseChanged {
|
|
115
|
-
/** The phase the agent is now in. */
|
|
116
|
-
phase: string;
|
|
117
|
-
/** The phase it left. */
|
|
118
|
-
previousPhase?: string;
|
|
119
|
-
}
|
|
120
|
-
/** A progress step's status. Open: new values may be added. `succeeded` and `failed` are final. */
|
|
121
|
-
export type ProgressStatus = "running" | "succeeded" | "failed" | (string & {});
|
|
122
|
-
/** The data of `progress.updated`. */
|
|
123
|
-
export interface ProgressUpdated {
|
|
124
|
-
/** The step's identifier, unique within the message. */
|
|
125
|
-
id: string;
|
|
126
|
-
/** What the step is doing, for display. */
|
|
127
|
-
label: string;
|
|
128
|
-
/** More detail for display. */
|
|
129
|
-
details?: string;
|
|
130
|
-
/** The step's status. Absent means running. */
|
|
131
|
-
status?: ProgressStatus;
|
|
132
|
-
/** The section of the answer the step belongs to, for display. */
|
|
133
|
-
section?: string;
|
|
134
|
-
}
|
|
135
|
-
/** The data of `text.delta`. */
|
|
136
|
-
export interface TextDelta {
|
|
137
|
-
/** The next fragment of answer text, to append to what came before. */
|
|
138
|
-
delta: string;
|
|
139
|
-
}
|
|
140
|
-
/** The data of `tool.finished`. */
|
|
141
|
-
export interface ToolFinished {
|
|
142
|
-
/** The tool call's identifier. */
|
|
143
|
-
toolCallId: string;
|
|
144
|
-
/** The tool called. */
|
|
145
|
-
toolName: string;
|
|
146
|
-
/** How the call ended. */
|
|
147
|
-
status: ToolStatus;
|
|
148
|
-
/** The call's result. Present only when the caller may read it. */
|
|
149
|
-
result?: unknown;
|
|
150
|
-
/** How long the call took, in milliseconds. */
|
|
151
|
-
durationMs?: number;
|
|
152
|
-
}
|
|
153
|
-
/** The data of `tool.started`. */
|
|
154
|
-
export interface ToolStarted {
|
|
155
|
-
/** The tool call's identifier. */
|
|
156
|
-
toolCallId: string;
|
|
157
|
-
/** The tool called. */
|
|
158
|
-
toolName: string;
|
|
159
|
-
/** The call's arguments. Present only when the caller may read them. */
|
|
160
|
-
arguments?: unknown;
|
|
161
|
-
}
|
|
162
|
-
/** How a tool call ended. Open: new values may be added. Every value is final. */
|
|
163
|
-
export type ToolStatus = "succeeded" | "failed" | (string & {});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { CaitlynClient } from "../CaitlynClient";
|
|
2
|
-
import { SseStream, type CallOptions, type WithRaw } from "@caitlyn-ai/sdk-core";
|
|
3
|
-
import type { CreateDocumentInput, CreateDocumentOutput, CreateUploadInput, CreateUploadOutput, Document, GetAgentVersionInput, GetAgentVersionOutput, ListDocumentsInput, ResumeConversationStreamInput, SendMessageInput, UpdateDraftVersionInput, UpdateDraftVersionOutput } from "../models/models_0";
|
|
4
|
-
import { type ConversationEvent, type Message } from "./events";
|
|
5
|
-
/** Creates a document from an upload; ingestion continues after the response.
|
|
6
|
-
*
|
|
7
|
-
* Returns 202 with the document in its initial state and the Operation that tracks ingestion, and
|
|
8
|
-
* `Location` names the Operation. Needs the files permission, read access to the knowledge base and
|
|
9
|
-
* access to the folder; it does not need update access to the knowledge base, which is for the
|
|
10
|
-
* knowledge base's own configuration. */
|
|
11
|
-
export declare function createDocument(client: CaitlynClient, input: Omit<CreateDocumentInput, "idempotencyKey">, options?: CallOptions & {
|
|
12
|
-
idempotencyKey?: string;
|
|
13
|
-
}): Promise<WithRaw<CreateDocumentOutput>>;
|
|
14
|
-
/** Reserves a short-lived slot for a file's bytes and returns a presigned URL bound to their
|
|
15
|
-
* checksum.
|
|
16
|
-
*
|
|
17
|
-
* Send the bytes with `uploadMethod` to `uploadUrl`, with every header in `requiredHeaders`,
|
|
18
|
-
* before `expiresAt`; then pass the upload's `id` to the operation that uses it. The SDKs'
|
|
19
|
-
* `uploads.create(file)` does all of this. */
|
|
20
|
-
export declare function createUpload(client: CaitlynClient, input: Omit<CreateUploadInput, "idempotencyKey">, options?: CallOptions & {
|
|
21
|
-
idempotencyKey?: string;
|
|
22
|
-
}): Promise<WithRaw<CreateUploadOutput>>;
|
|
23
|
-
/** Gets one version of an agent, with its full configuration and its ETag.
|
|
24
|
-
*
|
|
25
|
-
* `version` is `draft`, `production` or the name of a pinned or published version. Production is
|
|
26
|
-
* readable by everyone with access to the agent; the draft and pinned versions only by the people
|
|
27
|
-
* and groups on the agent's version access grant, and anyone else gets 404. */
|
|
28
|
-
export declare function getAgentVersion(client: CaitlynClient, input: GetAgentVersionInput, options?: CallOptions): Promise<WithRaw<GetAgentVersionOutput>>;
|
|
29
|
-
/** Lists the documents in a knowledge base, one page at a time.
|
|
30
|
-
*
|
|
31
|
-
* Documents are returned in a stable order that does not change between pages. Filters combine
|
|
32
|
-
* with AND. Unlike v2, an unknown filter is refused with 400 `UNKNOWN_FILTER` instead of being
|
|
33
|
-
* ignored, and the list can be sorted by `name`, `updatedAt` (when the document last changed) and
|
|
34
|
-
* `byteSize` on the server; v2 sorts on the client only. */
|
|
35
|
-
export declare function listDocuments(client: CaitlynClient, input: ListDocumentsInput, options?: CallOptions): AsyncIterable<WithRaw<Document>>;
|
|
36
|
-
/** Re-attaches to the answer that is being written, from the event after `Last-Event-ID`.
|
|
37
|
-
*
|
|
38
|
-
* Used by the SDKs after a dropped connection; callers rarely need it directly. When no answer is
|
|
39
|
-
* being written, the stream ends at once. */
|
|
40
|
-
export declare function resumeConversationStream(client: CaitlynClient, conversationId: string, input: Omit<ResumeConversationStreamInput, "conversationId">, options?: CallOptions): SseStream<ConversationEvent, Message>;
|
|
41
|
-
/** Sends a message and streams the answer as server-sent events.
|
|
42
|
-
*
|
|
43
|
-
* The stream ends with exactly one `message.completed` or `message.failed`. If the connection
|
|
44
|
-
* drops, the SDK re-attaches with `ResumeConversationStream` and `Last-Event-ID`, so no event is
|
|
45
|
-
* lost or repeated. Not retried automatically: a send that fails before the stream starts is
|
|
46
|
-
* reported to the caller. */
|
|
47
|
-
export declare function sendMessage(client: CaitlynClient, conversationId: string, input: Omit<SendMessageInput, "conversationId">, options?: CallOptions): SseStream<ConversationEvent, Message>;
|
|
48
|
-
/** Edits the draft with a partial update of its configuration; `If-Match` is required.
|
|
49
|
-
*
|
|
50
|
-
* Members that are absent stay unchanged, nested objects are merged and lists are replaced whole.
|
|
51
|
-
* To return a member to its default, name it in `clear`; naming a member that is not clearable, or
|
|
52
|
-
* one the same request also sets, is refused with 400 `VALIDATION_FAILED`. Returns the whole draft
|
|
53
|
-
* and its new ETag. */
|
|
54
|
-
export declare function updateDraftVersion(client: CaitlynClient, agentId: string, input: Omit<UpdateDraftVersionInput, "ifMatch" | "agentId">, options: CallOptions & {
|
|
55
|
-
ifMatch: string;
|
|
56
|
-
}): Promise<WithRaw<UpdateDraftVersionOutput>>;
|
|
57
|
-
/** Computes the SHA-256, reserves the upload slot and sends the bytes to it. */
|
|
58
|
-
export declare function createUploadFromFile(client: CaitlynClient, input: {
|
|
59
|
-
file: Blob;
|
|
60
|
-
fileName: string;
|
|
61
|
-
} & Omit<CreateUploadInput, "fileName" | "contentType" | "byteSize" | "sha256" | "idempotencyKey">, options?: CallOptions & {
|
|
62
|
-
idempotencyKey?: string;
|
|
63
|
-
}): Promise<WithRaw<CreateUploadOutput>>;
|
|
64
|
-
/** Uploads the file, then calls createDocument with the upload. */
|
|
65
|
-
export declare function uploadDocument(client: CaitlynClient, input: {
|
|
66
|
-
file: Blob;
|
|
67
|
-
fileName: string;
|
|
68
|
-
} & Omit<CreateDocumentInput, "uploadId" | "idempotencyKey">, options?: CallOptions & {
|
|
69
|
-
idempotencyKey?: string;
|
|
70
|
-
}): Promise<WithRaw<CreateDocumentOutput>>;
|