@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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caitlyn-ai/sdk",
|
|
3
3
|
"description": "The TypeScript SDK for the Caitlyn v3 API.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://build.caitlyn.ai",
|
|
7
7
|
"repository": {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"types": "./dist-types/sdk/index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
-
"caitlyn-source": "./src/sdk/index.ts",
|
|
19
18
|
"types": "./dist-types/sdk/index.d.ts",
|
|
20
19
|
"browser": "./dist-browser/sdk/index.mjs",
|
|
21
20
|
"worker": "./dist-browser/sdk/index.mjs",
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
40
39
|
"tslib": "^2.6.2",
|
|
41
|
-
"@caitlyn-ai/sdk-core": "0.
|
|
40
|
+
"@caitlyn-ai/sdk-core": "0.1.1",
|
|
42
41
|
"@smithy/core": "^3.37.0",
|
|
43
42
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
44
43
|
"@smithy/node-http-handler": "^4.13.0",
|
package/dist-types/Caitlyn.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { HttpHandlerOptions as __HttpHandlerOptions, MetricsRecorder as __MetricsRecorder, PaginationConfiguration, Paginator } from "@smithy/types";
|
|
2
|
-
import { CaitlynClient } from "./CaitlynClient";
|
|
3
|
-
import { type CreateDocumentCommandInput, type CreateDocumentCommandOutput } from "./commands/CreateDocumentCommand";
|
|
4
|
-
import { type CreateUploadCommandInput, type CreateUploadCommandOutput } from "./commands/CreateUploadCommand";
|
|
5
|
-
import { type GetAgentVersionCommandInput, type GetAgentVersionCommandOutput } from "./commands/GetAgentVersionCommand";
|
|
6
|
-
import { type ListDocumentsCommandInput, type ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
|
|
7
|
-
import { type ResumeConversationStreamCommandInput, type ResumeConversationStreamCommandOutput } from "./commands/ResumeConversationStreamCommand";
|
|
8
|
-
import { type SendMessageCommandInput, type SendMessageCommandOutput } from "./commands/SendMessageCommand";
|
|
9
|
-
import { type UpdateDraftVersionCommandInput, type UpdateDraftVersionCommandOutput } from "./commands/UpdateDraftVersionCommand";
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export interface CaitlynRequestOptions extends __HttpHandlerOptions {
|
|
14
|
-
metricsRecorder?: __MetricsRecorder<unknown>;
|
|
15
|
-
}
|
|
16
|
-
export interface Caitlyn {
|
|
17
|
-
/**
|
|
18
|
-
* @see {@link CreateDocumentCommand}
|
|
19
|
-
*/
|
|
20
|
-
createDocument(args: CreateDocumentCommandInput, options?: CaitlynRequestOptions): Promise<CreateDocumentCommandOutput>;
|
|
21
|
-
createDocument(args: CreateDocumentCommandInput, cb: (err: any, data?: CreateDocumentCommandOutput) => void): void;
|
|
22
|
-
createDocument(args: CreateDocumentCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: CreateDocumentCommandOutput) => void): void;
|
|
23
|
-
/**
|
|
24
|
-
* @see {@link CreateUploadCommand}
|
|
25
|
-
*/
|
|
26
|
-
createUpload(args: CreateUploadCommandInput, options?: CaitlynRequestOptions): Promise<CreateUploadCommandOutput>;
|
|
27
|
-
createUpload(args: CreateUploadCommandInput, cb: (err: any, data?: CreateUploadCommandOutput) => void): void;
|
|
28
|
-
createUpload(args: CreateUploadCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: CreateUploadCommandOutput) => void): void;
|
|
29
|
-
/**
|
|
30
|
-
* @see {@link GetAgentVersionCommand}
|
|
31
|
-
*/
|
|
32
|
-
getAgentVersion(args: GetAgentVersionCommandInput, options?: CaitlynRequestOptions): Promise<GetAgentVersionCommandOutput>;
|
|
33
|
-
getAgentVersion(args: GetAgentVersionCommandInput, cb: (err: any, data?: GetAgentVersionCommandOutput) => void): void;
|
|
34
|
-
getAgentVersion(args: GetAgentVersionCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: GetAgentVersionCommandOutput) => void): void;
|
|
35
|
-
/**
|
|
36
|
-
* @see {@link ListDocumentsCommand}
|
|
37
|
-
*/
|
|
38
|
-
listDocuments(args: ListDocumentsCommandInput, options?: CaitlynRequestOptions): Promise<ListDocumentsCommandOutput>;
|
|
39
|
-
listDocuments(args: ListDocumentsCommandInput, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void;
|
|
40
|
-
listDocuments(args: ListDocumentsCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void;
|
|
41
|
-
/**
|
|
42
|
-
* @see {@link ResumeConversationStreamCommand}
|
|
43
|
-
*/
|
|
44
|
-
resumeConversationStream(args: ResumeConversationStreamCommandInput, options?: CaitlynRequestOptions): Promise<ResumeConversationStreamCommandOutput>;
|
|
45
|
-
resumeConversationStream(args: ResumeConversationStreamCommandInput, cb: (err: any, data?: ResumeConversationStreamCommandOutput) => void): void;
|
|
46
|
-
resumeConversationStream(args: ResumeConversationStreamCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: ResumeConversationStreamCommandOutput) => void): void;
|
|
47
|
-
/**
|
|
48
|
-
* @see {@link SendMessageCommand}
|
|
49
|
-
*/
|
|
50
|
-
sendMessage(args: SendMessageCommandInput, options?: CaitlynRequestOptions): Promise<SendMessageCommandOutput>;
|
|
51
|
-
sendMessage(args: SendMessageCommandInput, cb: (err: any, data?: SendMessageCommandOutput) => void): void;
|
|
52
|
-
sendMessage(args: SendMessageCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: SendMessageCommandOutput) => void): void;
|
|
53
|
-
/**
|
|
54
|
-
* @see {@link UpdateDraftVersionCommand}
|
|
55
|
-
*/
|
|
56
|
-
updateDraftVersion(args: UpdateDraftVersionCommandInput, options?: CaitlynRequestOptions): Promise<UpdateDraftVersionCommandOutput>;
|
|
57
|
-
updateDraftVersion(args: UpdateDraftVersionCommandInput, cb: (err: any, data?: UpdateDraftVersionCommandOutput) => void): void;
|
|
58
|
-
updateDraftVersion(args: UpdateDraftVersionCommandInput, options: CaitlynRequestOptions, cb: (err: any, data?: UpdateDraftVersionCommandOutput) => void): void;
|
|
59
|
-
/**
|
|
60
|
-
* @see {@link ListDocumentsCommand}
|
|
61
|
-
* @param args - command input.
|
|
62
|
-
* @param paginationConfig - optional pagination config.
|
|
63
|
-
* @returns AsyncIterable of {@link ListDocumentsCommandOutput}.
|
|
64
|
-
*/
|
|
65
|
-
paginateListDocuments(args: ListDocumentsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<ListDocumentsCommandOutput>;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* The Caitlyn v3 API.
|
|
69
|
-
*
|
|
70
|
-
* Every request is made to a workspace's own hostname, which names the workspace, and carries a
|
|
71
|
-
* short-lived Caitlyn bearer token, however the caller signed in. The `session` sign-in mode (the
|
|
72
|
-
* browser cookie) is handled by the SDKs' runtime and is not modelled per operation.
|
|
73
|
-
* @public
|
|
74
|
-
*/
|
|
75
|
-
export declare class Caitlyn extends CaitlynClient implements Caitlyn {
|
|
76
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { type DefaultsMode as __DefaultsMode, type SmithyConfiguration as __SmithyConfiguration, type SmithyResolvedConfiguration as __SmithyResolvedConfiguration, Client as __Client } from "@smithy/core/client";
|
|
2
|
-
import { type EndpointInputConfig, type EndpointRequiredInputConfig, type EndpointRequiredResolvedConfig, type EndpointResolvedConfig } from "@smithy/core/endpoints";
|
|
3
|
-
import { type HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/core/protocols";
|
|
4
|
-
import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/core/retry";
|
|
5
|
-
import type { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, SdkStreamMixinInjector as __SdkStreamMixinInjector, StreamCollector as __StreamCollector, UrlParser as __UrlParser } from "@smithy/types";
|
|
6
|
-
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
7
|
-
import type { CreateDocumentCommandInput, CreateDocumentCommandOutput } from "./commands/CreateDocumentCommand";
|
|
8
|
-
import type { CreateUploadCommandInput, CreateUploadCommandOutput } from "./commands/CreateUploadCommand";
|
|
9
|
-
import type { GetAgentVersionCommandInput, GetAgentVersionCommandOutput } from "./commands/GetAgentVersionCommand";
|
|
10
|
-
import type { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
|
|
11
|
-
import type { ResumeConversationStreamCommandInput, ResumeConversationStreamCommandOutput } from "./commands/ResumeConversationStreamCommand";
|
|
12
|
-
import type { SendMessageCommandInput, SendMessageCommandOutput } from "./commands/SendMessageCommand";
|
|
13
|
-
import type { UpdateDraftVersionCommandInput, UpdateDraftVersionCommandOutput } from "./commands/UpdateDraftVersionCommand";
|
|
14
|
-
import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
|
|
15
|
-
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
16
|
-
export { __Client };
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export type ServiceInputTypes = CreateDocumentCommandInput | CreateUploadCommandInput | GetAgentVersionCommandInput | ListDocumentsCommandInput | ResumeConversationStreamCommandInput | SendMessageCommandInput | UpdateDraftVersionCommandInput;
|
|
21
|
-
/**
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
export type ServiceOutputTypes = CreateDocumentCommandOutput | CreateUploadCommandOutput | GetAgentVersionCommandOutput | ListDocumentsCommandOutput | ResumeConversationStreamCommandOutput | SendMessageCommandOutput | UpdateDraftVersionCommandOutput;
|
|
25
|
-
/**
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
29
|
-
/**
|
|
30
|
-
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
31
|
-
*/
|
|
32
|
-
requestHandler?: __HttpHandlerUserInput;
|
|
33
|
-
/**
|
|
34
|
-
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
35
|
-
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
39
|
-
/**
|
|
40
|
-
* The function that will be used to convert strings into HTTP endpoints.
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
43
|
-
urlParser?: __UrlParser;
|
|
44
|
-
/**
|
|
45
|
-
* A function that can calculate the length of a request body.
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
48
|
-
bodyLengthChecker?: __BodyLengthCalculator;
|
|
49
|
-
/**
|
|
50
|
-
* A function that converts a stream into an array of bytes.
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
streamCollector?: __StreamCollector;
|
|
54
|
-
/**
|
|
55
|
-
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
base64Decoder?: __Decoder;
|
|
59
|
-
/**
|
|
60
|
-
* The function that will be used to convert binary data to a base64-encoded string.
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
base64Encoder?: __Encoder;
|
|
64
|
-
/**
|
|
65
|
-
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
utf8Decoder?: __Decoder;
|
|
69
|
-
/**
|
|
70
|
-
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
utf8Encoder?: __Encoder;
|
|
74
|
-
/**
|
|
75
|
-
* The runtime environment.
|
|
76
|
-
* @internal
|
|
77
|
-
*/
|
|
78
|
-
runtime?: string;
|
|
79
|
-
/**
|
|
80
|
-
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
81
|
-
* trait of an operation.
|
|
82
|
-
*/
|
|
83
|
-
disableHostPrefix?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Value for how many times a request will be made at most in case of retry.
|
|
86
|
-
*/
|
|
87
|
-
maxAttempts?: number | __Provider<number>;
|
|
88
|
-
/**
|
|
89
|
-
* Specifies which retry algorithm to use.
|
|
90
|
-
* Accepted values are "standard" and "adaptive".
|
|
91
|
-
* @see https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
94
|
-
retryMode?: string | __Provider<string>;
|
|
95
|
-
/**
|
|
96
|
-
* Optional logger for logging debug/info/warn/error.
|
|
97
|
-
*/
|
|
98
|
-
logger?: __Logger;
|
|
99
|
-
/**
|
|
100
|
-
* Optional extensions
|
|
101
|
-
*/
|
|
102
|
-
extensions?: RuntimeExtension[];
|
|
103
|
-
/**
|
|
104
|
-
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
105
|
-
*/
|
|
106
|
-
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
107
|
-
/**
|
|
108
|
-
* The internal function that inject utilities to runtime-specific stream to help users consume the data
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
sdkStreamMixin?: __SdkStreamMixinInjector;
|
|
112
|
-
/**
|
|
113
|
-
* The SDK package version, sent in the user agent.
|
|
114
|
-
* @internal
|
|
115
|
-
*/
|
|
116
|
-
caitlynSdkVersion?: string;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @public
|
|
120
|
-
*/
|
|
121
|
-
export type CaitlynClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RetryInputConfig & EndpointInputConfig<EndpointParameters> & EndpointRequiredInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
122
|
-
/**
|
|
123
|
-
* @public
|
|
124
|
-
*
|
|
125
|
-
* The configuration interface of CaitlynClient class constructor that set the region, credentials and other options.
|
|
126
|
-
*/
|
|
127
|
-
export interface CaitlynClientConfig extends CaitlynClientConfigType {
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @public
|
|
131
|
-
*/
|
|
132
|
-
export type CaitlynClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RetryResolvedConfig & EndpointResolvedConfig<EndpointParameters> & EndpointRequiredResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
133
|
-
/**
|
|
134
|
-
* @public
|
|
135
|
-
*
|
|
136
|
-
* The resolved configuration interface of CaitlynClient class. This is resolved and normalized from the {@link CaitlynClientConfig | constructor configuration interface}.
|
|
137
|
-
*/
|
|
138
|
-
export interface CaitlynClientResolvedConfig extends CaitlynClientResolvedConfigType {
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* The Caitlyn v3 API.
|
|
142
|
-
*
|
|
143
|
-
* Every request is made to a workspace's own hostname, which names the workspace, and carries a
|
|
144
|
-
* short-lived Caitlyn bearer token, however the caller signed in. The `session` sign-in mode (the
|
|
145
|
-
* browser cookie) is handled by the SDKs' runtime and is not modelled per operation.
|
|
146
|
-
* @public
|
|
147
|
-
*/
|
|
148
|
-
export declare class CaitlynClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, CaitlynClientResolvedConfig> {
|
|
149
|
-
/**
|
|
150
|
-
* The resolved configuration of CaitlynClient class. This is resolved and normalized from the {@link CaitlynClientConfig | constructor configuration interface}.
|
|
151
|
-
*/
|
|
152
|
-
readonly config: CaitlynClientResolvedConfig;
|
|
153
|
-
constructor(...[configuration]: __CheckOptionalClientConfig<CaitlynClientConfig>);
|
|
154
|
-
/**
|
|
155
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
156
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
157
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
158
|
-
*/
|
|
159
|
-
destroy(): void;
|
|
160
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type HttpAuthScheme, TokenIdentity, TokenIdentityProvider } from "@smithy/types";
|
|
2
|
-
import type { CaitlynHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export interface HttpAuthExtensionConfiguration {
|
|
7
|
-
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
-
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider: CaitlynHttpAuthSchemeProvider): void;
|
|
10
|
-
httpAuthSchemeProvider(): CaitlynHttpAuthSchemeProvider;
|
|
11
|
-
setToken(token: TokenIdentity | TokenIdentityProvider): void;
|
|
12
|
-
token(): TokenIdentity | TokenIdentityProvider | undefined;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
-
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
-
httpAuthSchemeProvider: CaitlynHttpAuthSchemeProvider;
|
|
20
|
-
token: TokenIdentity | TokenIdentityProvider;
|
|
21
|
-
}>;
|
|
22
|
-
/**
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type HandlerExecutionContext, type HttpAuthScheme, type HttpAuthSchemeParameters, type HttpAuthSchemeParametersProvider, type HttpAuthSchemeProvider, type Provider, TokenIdentity, TokenIdentityProvider } from "@smithy/types";
|
|
2
|
-
import type { CaitlynClientResolvedConfig } from "../CaitlynClient";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export interface CaitlynHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
export interface CaitlynHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<CaitlynClientResolvedConfig, HandlerExecutionContext, CaitlynHttpAuthSchemeParameters, object> {
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
export declare const defaultCaitlynHttpAuthSchemeParametersProvider: (config: CaitlynClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<CaitlynHttpAuthSchemeParameters>;
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
export interface CaitlynHttpAuthSchemeProvider extends HttpAuthSchemeProvider<CaitlynHttpAuthSchemeParameters> {
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
export declare const defaultCaitlynHttpAuthSchemeProvider: CaitlynHttpAuthSchemeProvider;
|
|
26
|
-
/**
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export interface HttpAuthSchemeInputConfig {
|
|
30
|
-
/**
|
|
31
|
-
* A comma-separated list of case-sensitive auth scheme names.
|
|
32
|
-
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
33
|
-
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
authSchemePreference?: string[] | Provider<string[]>;
|
|
37
|
-
/**
|
|
38
|
-
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
httpAuthSchemes?: HttpAuthScheme[];
|
|
42
|
-
/**
|
|
43
|
-
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
46
|
-
httpAuthSchemeProvider?: CaitlynHttpAuthSchemeProvider;
|
|
47
|
-
/**
|
|
48
|
-
* The token used to authenticate requests.
|
|
49
|
-
*/
|
|
50
|
-
token?: TokenIdentity | TokenIdentityProvider;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
export interface HttpAuthSchemeResolvedConfig {
|
|
56
|
-
/**
|
|
57
|
-
* A comma-separated list of case-sensitive auth scheme names.
|
|
58
|
-
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
59
|
-
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
60
|
-
* @public
|
|
61
|
-
*/
|
|
62
|
-
readonly authSchemePreference: Provider<string[]>;
|
|
63
|
-
/**
|
|
64
|
-
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
68
|
-
/**
|
|
69
|
-
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
readonly httpAuthSchemeProvider: CaitlynHttpAuthSchemeProvider;
|
|
73
|
-
/**
|
|
74
|
-
* The token used to authenticate requests.
|
|
75
|
-
*/
|
|
76
|
-
readonly token?: TokenIdentityProvider;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig) => T & HttpAuthSchemeResolvedConfig;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { EndpointParameterInstructions } from "@smithy/types";
|
|
2
|
-
import type { CaitlynClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "./CaitlynClient";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare const command: <I extends ServiceInputTypes, O extends ServiceOutputTypes>(added: EndpointParameterInstructions, plugins: (CommandCtor: any, clientStack: any, config: any, options: any) => import("@smithy/types").Pluggable<any, any>[], op: string, $: import("@smithy/types").StaticOperationSchema, smithyContext?: Record<string, unknown>) => {
|
|
7
|
-
new (input: I): import("@smithy/core/client").CommandImpl<I, O, CaitlynClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
8
|
-
new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, CaitlynClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
9
|
-
getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const _ep0: EndpointParameterInstructions;
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
export declare const _mw0: (Command: any, cs: any, config: any, o: any) => never[];
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
2
|
-
import type { CreateDocumentInput, CreateDocumentOutput } from "../models/models_0";
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export type { __MetadataBearer };
|
|
7
|
-
/**
|
|
8
|
-
* @public
|
|
9
|
-
*
|
|
10
|
-
* The input for {@link CreateDocumentCommand}.
|
|
11
|
-
*/
|
|
12
|
-
export interface CreateDocumentCommandInput extends CreateDocumentInput {
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
*
|
|
17
|
-
* The output of {@link CreateDocumentCommand}.
|
|
18
|
-
*/
|
|
19
|
-
export interface CreateDocumentCommandOutput extends CreateDocumentOutput, __MetadataBearer {
|
|
20
|
-
}
|
|
21
|
-
declare const CreateDocumentCommand_base: {
|
|
22
|
-
new (input: CreateDocumentCommandInput): import("@smithy/core/client").CommandImpl<CreateDocumentCommandInput, CreateDocumentCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
23
|
-
new (input: CreateDocumentCommandInput): import("@smithy/core/client").CommandImpl<CreateDocumentCommandInput, CreateDocumentCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
24
|
-
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Creates a document from an upload; ingestion continues after the response.
|
|
28
|
-
*
|
|
29
|
-
* Returns 202 with the document in its initial state and the Operation that tracks ingestion, and
|
|
30
|
-
* `Location` names the Operation. Needs the files permission, read access to the knowledge base and
|
|
31
|
-
* access to the folder; it does not need update access to the knowledge base, which is for the
|
|
32
|
-
* knowledge base's own configuration.
|
|
33
|
-
* @example
|
|
34
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
35
|
-
* ```javascript
|
|
36
|
-
* import { CaitlynClient, CreateDocumentCommand } from "@caitlyn-ai/sdk"; // ES Modules import
|
|
37
|
-
* // const { CaitlynClient, CreateDocumentCommand } = require("@caitlyn-ai/sdk"); // CommonJS import
|
|
38
|
-
* // import type { CaitlynClientConfig } from "@caitlyn-ai/sdk";
|
|
39
|
-
* const config = {}; // type is CaitlynClientConfig
|
|
40
|
-
* const client = new CaitlynClient(config);
|
|
41
|
-
* const input = { // CreateDocumentInput
|
|
42
|
-
* knowledgeBaseId: "STRING_VALUE", // required
|
|
43
|
-
* idempotencyKey: "STRING_VALUE",
|
|
44
|
-
* uploadId: "STRING_VALUE", // required
|
|
45
|
-
* folder: "STRING_VALUE", // required
|
|
46
|
-
* name: "STRING_VALUE",
|
|
47
|
-
* };
|
|
48
|
-
* const command = new CreateDocumentCommand(input);
|
|
49
|
-
* const response = await client.send(command);
|
|
50
|
-
* // { // CreateDocumentOutput
|
|
51
|
-
* // requestId: "STRING_VALUE",
|
|
52
|
-
* // apiVersion: "STRING_VALUE",
|
|
53
|
-
* // location: "STRING_VALUE",
|
|
54
|
-
* // document: { // Document
|
|
55
|
-
* // id: "STRING_VALUE", // required
|
|
56
|
-
* // knowledgeBaseId: "STRING_VALUE", // required
|
|
57
|
-
* // name: "STRING_VALUE", // required
|
|
58
|
-
* // folder: "STRING_VALUE", // required
|
|
59
|
-
* // status: "pending" || "processing" || "indexed" || "partially_indexed" || "failed" || "deleting", // required
|
|
60
|
-
* // stage: "STRING_VALUE",
|
|
61
|
-
* // contentType: "STRING_VALUE",
|
|
62
|
-
* // byteSize: Number("long"),
|
|
63
|
-
* // sha256: "STRING_VALUE",
|
|
64
|
-
* // createdAt: new Date("TIMESTAMP"), // required
|
|
65
|
-
* // updatedAt: new Date("TIMESTAMP"), // required
|
|
66
|
-
* // partialFailures: [ // PartialFailureList
|
|
67
|
-
* // { // PartialFailure
|
|
68
|
-
* // targetId: "STRING_VALUE",
|
|
69
|
-
* // code: "STRING_VALUE", // required
|
|
70
|
-
* // detail: "STRING_VALUE",
|
|
71
|
-
* // },
|
|
72
|
-
* // ],
|
|
73
|
-
* // },
|
|
74
|
-
* // operation: { // Operation
|
|
75
|
-
* // id: "STRING_VALUE", // required
|
|
76
|
-
* // kind: "document_ingestion", // required
|
|
77
|
-
* // status: "queued" || "running" || "succeeded" || "succeeded_with_failures" || "failed" || "cancelled", // required
|
|
78
|
-
* // createdAt: new Date("TIMESTAMP"), // required
|
|
79
|
-
* // },
|
|
80
|
-
* // };
|
|
81
|
-
*
|
|
82
|
-
* ```
|
|
83
|
-
*
|
|
84
|
-
* @param CreateDocumentCommandInput - {@link CreateDocumentCommandInput}
|
|
85
|
-
* @returns {@link CreateDocumentCommandOutput}
|
|
86
|
-
* @see {@link CreateDocumentCommandInput} for command's `input` shape.
|
|
87
|
-
* @see {@link CreateDocumentCommandOutput} for command's `response` shape.
|
|
88
|
-
* @see {@link CaitlynClientResolvedConfig | config} for CaitlynClient's `config` shape.
|
|
89
|
-
*
|
|
90
|
-
* @throws {@link ConflictError} (client fault)
|
|
91
|
-
* The resource's state does not allow the request, a unique name is taken, or a request with the
|
|
92
|
-
* same idempotency key is still in progress.
|
|
93
|
-
*
|
|
94
|
-
* @throws {@link NotFoundError} (client fault)
|
|
95
|
-
* The record does not exist, or the caller may not see it. The two are deliberately the same, so
|
|
96
|
-
* identifiers cannot be probed.
|
|
97
|
-
*
|
|
98
|
-
* @throws {@link UnprocessableContentError} (client fault)
|
|
99
|
-
* The idempotency key was already used with a different request body.
|
|
100
|
-
*
|
|
101
|
-
* @throws {@link InternalError} (server fault)
|
|
102
|
-
* An unexpected server failure. Not retried by the SDKs.
|
|
103
|
-
*
|
|
104
|
-
* @throws {@link PermissionDeniedError} (client fault)
|
|
105
|
-
* The caller may not call this operation: it lacks the permission, its credential type may not
|
|
106
|
-
* call it, or the operation is served only on the organisation's primary workspace. Decided before
|
|
107
|
-
* any record is read. A record the caller may not see is 404 instead.
|
|
108
|
-
*
|
|
109
|
-
* @throws {@link ServiceUnavailableError} (server fault)
|
|
110
|
-
* A dependency is briefly unavailable, or the request's audit event could not be recorded; wait for
|
|
111
|
-
* `Retry-After` and try again.
|
|
112
|
-
*
|
|
113
|
-
* @throws {@link TooManyRequestsError} (client fault)
|
|
114
|
-
* Too many requests; wait for `Retry-After` and try again.
|
|
115
|
-
*
|
|
116
|
-
* @throws {@link UnauthenticatedError} (client fault)
|
|
117
|
-
* No credential was sent, or it is expired or not valid.
|
|
118
|
-
*
|
|
119
|
-
* @throws {@link ValidationError} (client fault)
|
|
120
|
-
* The request is malformed: a member is missing, the wrong type or out of range; it has a member,
|
|
121
|
-
* filter or sort field the operation does not define; or its cursor is not valid for this list.
|
|
122
|
-
*
|
|
123
|
-
* @throws {@link CaitlynServiceException}
|
|
124
|
-
* <p>Base exception class for all service exceptions from Caitlyn service.</p>
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @example Add an uploaded file to the HR folder
|
|
128
|
-
* ```javascript
|
|
129
|
-
* //
|
|
130
|
-
* const input = {
|
|
131
|
-
* folder: "hr/",
|
|
132
|
-
* idempotencyKey: "3f0c9a1e-5d2b-4f7a-9c1e-2b8d4a6f0e13",
|
|
133
|
-
* knowledgeBaseId: "KB4T7YQ2WL",
|
|
134
|
-
* name: "Leave policy",
|
|
135
|
-
* uploadId: "0193a6f2-1111-7a2b-8c3d-4e5f60718293"
|
|
136
|
-
* };
|
|
137
|
-
* const command = new CreateDocumentCommand(input);
|
|
138
|
-
* const response = await client.send(command);
|
|
139
|
-
* /* response is
|
|
140
|
-
* {
|
|
141
|
-
* document: {
|
|
142
|
-
* createdAt: "2026-11-10T01:02:03.000Z",
|
|
143
|
-
* folder: "hr/",
|
|
144
|
-
* id: "doc-3b7f9e21",
|
|
145
|
-
* knowledgeBaseId: "KB4T7YQ2WL",
|
|
146
|
-
* name: "Leave policy",
|
|
147
|
-
* status: "pending",
|
|
148
|
-
* updatedAt: "2026-11-10T01:02:03.000Z"
|
|
149
|
-
* },
|
|
150
|
-
* location: "/api/v3/operations/0193a6f2-2222-7b3c-9d4e-5f6071829304",
|
|
151
|
-
* operation: {
|
|
152
|
-
* createdAt: "2026-11-10T01:02:03.000Z",
|
|
153
|
-
* id: "0193a6f2-2222-7b3c-9d4e-5f6071829304",
|
|
154
|
-
* kind: "document_ingestion",
|
|
155
|
-
* status: "queued"
|
|
156
|
-
* }
|
|
157
|
-
* }
|
|
158
|
-
* *\/
|
|
159
|
-
* ```
|
|
160
|
-
*
|
|
161
|
-
* @example The upload was already used, or has expired
|
|
162
|
-
* ```javascript
|
|
163
|
-
* //
|
|
164
|
-
* const input = {
|
|
165
|
-
* folder: "hr/",
|
|
166
|
-
* knowledgeBaseId: "KB4T7YQ2WL",
|
|
167
|
-
* uploadId: "0193a6f2-1111-7a2b-8c3d-4e5f60718293"
|
|
168
|
-
* };
|
|
169
|
-
* const command = new CreateDocumentCommand(input);
|
|
170
|
-
* const response = await client.send(command);
|
|
171
|
-
* /* response is
|
|
172
|
-
* { /* metadata only *\/ }
|
|
173
|
-
* *\/
|
|
174
|
-
* ```
|
|
175
|
-
*
|
|
176
|
-
* @public
|
|
177
|
-
*/
|
|
178
|
-
export declare class CreateDocumentCommand extends CreateDocumentCommand_base {
|
|
179
|
-
/** @internal type navigation helper, not in runtime. */
|
|
180
|
-
protected static __types: {
|
|
181
|
-
api: {
|
|
182
|
-
input: CreateDocumentInput;
|
|
183
|
-
output: CreateDocumentOutput;
|
|
184
|
-
};
|
|
185
|
-
sdk: {
|
|
186
|
-
input: CreateDocumentCommandInput;
|
|
187
|
-
output: CreateDocumentCommandOutput;
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
}
|