@caitlyn-ai/sdk 0.0.2 → 0.1.0

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.
Files changed (43) hide show
  1. package/README.md +39 -7
  2. package/dist-browser/sdk/index.mjs +59 -33
  3. package/dist-browser/sdk/index.mjs.map +3 -3
  4. package/dist-cjs/sdk/index.cjs +59 -32
  5. package/dist-cjs/sdk/index.cjs.map +3 -3
  6. package/dist-es/sdk/index.mjs +59 -33
  7. package/dist-es/sdk/index.mjs.map +3 -3
  8. package/dist-types/sdk/index.d.ts +5376 -8
  9. package/package.json +2 -3
  10. package/dist-types/Caitlyn.d.ts +0 -76
  11. package/dist-types/CaitlynClient.d.ts +0 -160
  12. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +0 -29
  13. package/dist-types/auth/httpAuthSchemeProvider.d.ts +0 -81
  14. package/dist-types/commandBuilder.d.ts +0 -18
  15. package/dist-types/commands/CreateDocumentCommand.d.ts +0 -190
  16. package/dist-types/commands/CreateUploadCommand.d.ts +0 -165
  17. package/dist-types/commands/GetAgentVersionCommand.d.ts +0 -177
  18. package/dist-types/commands/ListDocumentsCommand.d.ts +0 -176
  19. package/dist-types/commands/ResumeConversationStreamCommand.d.ts +0 -146
  20. package/dist-types/commands/SendMessageCommand.d.ts +0 -183
  21. package/dist-types/commands/UpdateDraftVersionCommand.d.ts +0 -202
  22. package/dist-types/commands/index.d.ts +0 -7
  23. package/dist-types/endpoint/EndpointParameters.d.ts +0 -32
  24. package/dist-types/endpoint/bdd.d.ts +0 -2
  25. package/dist-types/endpoint/endpointResolver.d.ts +0 -8
  26. package/dist-types/extensionConfiguration.d.ts +0 -8
  27. package/dist-types/index.d.ts +0 -22
  28. package/dist-types/models/CaitlynServiceException.d.ts +0 -15
  29. package/dist-types/models/enums.d.ts +0 -148
  30. package/dist-types/models/errors.d.ts +0 -659
  31. package/dist-types/models/models_0.d.ts +0 -754
  32. package/dist-types/pagination/Interfaces.d.ts +0 -8
  33. package/dist-types/pagination/ListDocumentsPaginator.d.ts +0 -7
  34. package/dist-types/pagination/index.d.ts +0 -2
  35. package/dist-types/runtimeConfig.browser.d.ts +0 -50
  36. package/dist-types/runtimeConfig.d.ts +0 -50
  37. package/dist-types/runtimeConfig.native.d.ts +0 -49
  38. package/dist-types/runtimeConfig.shared.d.ts +0 -36
  39. package/dist-types/runtimeExtensions.d.ts +0 -17
  40. package/dist-types/schemas/schemas_0.d.ts +0 -51
  41. package/dist-types/sdk/client.d.ts +0 -47
  42. package/dist-types/sdk/events.d.ts +0 -163
  43. package/dist-types/sdk/operations.d.ts +0 -70
@@ -1,165 +0,0 @@
1
- import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
- import type { CreateUploadInput, CreateUploadOutput } from "../models/models_0";
3
- /**
4
- * @public
5
- */
6
- export type { __MetadataBearer };
7
- /**
8
- * @public
9
- *
10
- * The input for {@link CreateUploadCommand}.
11
- */
12
- export interface CreateUploadCommandInput extends CreateUploadInput {
13
- }
14
- /**
15
- * @public
16
- *
17
- * The output of {@link CreateUploadCommand}.
18
- */
19
- export interface CreateUploadCommandOutput extends CreateUploadOutput, __MetadataBearer {
20
- }
21
- declare const CreateUploadCommand_base: {
22
- new (input: CreateUploadCommandInput): import("@smithy/core/client").CommandImpl<CreateUploadCommandInput, CreateUploadCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
- new (input: CreateUploadCommandInput): import("@smithy/core/client").CommandImpl<CreateUploadCommandInput, CreateUploadCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
- };
26
- /**
27
- * Reserves a short-lived slot for a file's bytes and returns a presigned URL bound to their
28
- * checksum.
29
- *
30
- * Send the bytes with `uploadMethod` to `uploadUrl`, with every header in `requiredHeaders`,
31
- * before `expiresAt`; then pass the upload's `id` to the operation that uses it. The SDKs'
32
- * `uploads.create(file)` does all of this.
33
- * @example
34
- * Use a bare-bones client and the command you need to make an API call.
35
- * ```javascript
36
- * import { CaitlynClient, CreateUploadCommand } from "@caitlyn-ai/sdk"; // ES Modules import
37
- * // const { CaitlynClient, CreateUploadCommand } = 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 = { // CreateUploadInput
42
- * idempotencyKey: "STRING_VALUE",
43
- * fileName: "STRING_VALUE", // required
44
- * contentType: "STRING_VALUE", // required
45
- * byteSize: Number("long"), // required
46
- * sha256: "STRING_VALUE", // required
47
- * };
48
- * const command = new CreateUploadCommand(input);
49
- * const response = await client.send(command);
50
- * // { // CreateUploadOutput
51
- * // requestId: "STRING_VALUE",
52
- * // apiVersion: "STRING_VALUE",
53
- * // location: "STRING_VALUE",
54
- * // id: "STRING_VALUE", // required
55
- * // uploadUrl: "STRING_VALUE", // required
56
- * // uploadMethod: "STRING_VALUE", // required
57
- * // requiredHeaders: { // HeaderMap // required
58
- * // "<keys>": "STRING_VALUE",
59
- * // },
60
- * // expiresAt: new Date("TIMESTAMP"), // required
61
- * // status: "awaiting_bytes" || "received" || "consumed" || "expired", // required
62
- * // };
63
- *
64
- * ```
65
- *
66
- * @param CreateUploadCommandInput - {@link CreateUploadCommandInput}
67
- * @returns {@link CreateUploadCommandOutput}
68
- * @see {@link CreateUploadCommandInput} for command's `input` shape.
69
- * @see {@link CreateUploadCommandOutput} for command's `response` shape.
70
- * @see {@link CaitlynClientResolvedConfig | config} for CaitlynClient's `config` shape.
71
- *
72
- * @throws {@link ConflictError} (client fault)
73
- * The resource's state does not allow the request, a unique name is taken, or a request with the
74
- * same idempotency key is still in progress.
75
- *
76
- * @throws {@link PayloadTooLargeError} (client fault)
77
- * The body, a file or the send `context` is over its documented limit.
78
- *
79
- * @throws {@link UnprocessableContentError} (client fault)
80
- * The idempotency key was already used with a different request body.
81
- *
82
- * @throws {@link InternalError} (server fault)
83
- * An unexpected server failure. Not retried by the SDKs.
84
- *
85
- * @throws {@link PermissionDeniedError} (client fault)
86
- * The caller may not call this operation: it lacks the permission, its credential type may not
87
- * call it, or the operation is served only on the organisation's primary workspace. Decided before
88
- * any record is read. A record the caller may not see is 404 instead.
89
- *
90
- * @throws {@link ServiceUnavailableError} (server fault)
91
- * A dependency is briefly unavailable, or the request's audit event could not be recorded; wait for
92
- * `Retry-After` and try again.
93
- *
94
- * @throws {@link TooManyRequestsError} (client fault)
95
- * Too many requests; wait for `Retry-After` and try again.
96
- *
97
- * @throws {@link UnauthenticatedError} (client fault)
98
- * No credential was sent, or it is expired or not valid.
99
- *
100
- * @throws {@link ValidationError} (client fault)
101
- * The request is malformed: a member is missing, the wrong type or out of range; it has a member,
102
- * filter or sort field the operation does not define; or its cursor is not valid for this list.
103
- *
104
- * @throws {@link CaitlynServiceException}
105
- * <p>Base exception class for all service exceptions from Caitlyn service.</p>
106
- *
107
- *
108
- * @example Reserve an upload for a PDF
109
- * ```javascript
110
- * //
111
- * const input = {
112
- * byteSize: 482113,
113
- * contentType: "application/pdf",
114
- * fileName: "leave-policy.pdf",
115
- * idempotencyKey: "9b1d4e2a-7c3f-4a8e-b5d6-0e1f2a3b4c5d",
116
- * sha256: "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg="
117
- * };
118
- * const command = new CreateUploadCommand(input);
119
- * const response = await client.send(command);
120
- * /* response is
121
- * {
122
- * expiresAt: "2026-11-10T01:17:03.000Z",
123
- * id: "0193a6f2-1111-7a2b-8c3d-4e5f60718293",
124
- * location: "/api/v3/uploads/0193a6f2-1111-7a2b-8c3d-4e5f60718293",
125
- * requiredHeaders: {
126
- * Content-Type: "application/pdf"
127
- * },
128
- * status: "awaiting_bytes",
129
- * uploadMethod: "PUT",
130
- * uploadUrl: "https://uploads.example.com/0193a6f2-1111-7a2b-8c3d-4e5f60718293?signature=abc"
131
- * }
132
- * *\/
133
- * ```
134
- *
135
- * @example A file over the size limit
136
- * ```javascript
137
- * //
138
- * const input = {
139
- * byteSize: 9000000000,
140
- * contentType: "application/zip",
141
- * fileName: "archive.zip",
142
- * sha256: "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg="
143
- * };
144
- * const command = new CreateUploadCommand(input);
145
- * const response = await client.send(command);
146
- * /* response is
147
- * { /* metadata only *\/ }
148
- * *\/
149
- * ```
150
- *
151
- * @public
152
- */
153
- export declare class CreateUploadCommand extends CreateUploadCommand_base {
154
- /** @internal type navigation helper, not in runtime. */
155
- protected static __types: {
156
- api: {
157
- input: CreateUploadInput;
158
- output: CreateUploadOutput;
159
- };
160
- sdk: {
161
- input: CreateUploadCommandInput;
162
- output: CreateUploadCommandOutput;
163
- };
164
- };
165
- }
@@ -1,177 +0,0 @@
1
- import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
- import type { GetAgentVersionInput, GetAgentVersionOutput } from "../models/models_0";
3
- /**
4
- * @public
5
- */
6
- export type { __MetadataBearer };
7
- /**
8
- * @public
9
- *
10
- * The input for {@link GetAgentVersionCommand}.
11
- */
12
- export interface GetAgentVersionCommandInput extends GetAgentVersionInput {
13
- }
14
- /**
15
- * @public
16
- *
17
- * The output of {@link GetAgentVersionCommand}.
18
- */
19
- export interface GetAgentVersionCommandOutput extends GetAgentVersionOutput, __MetadataBearer {
20
- }
21
- declare const GetAgentVersionCommand_base: {
22
- new (input: GetAgentVersionCommandInput): import("@smithy/core/client").CommandImpl<GetAgentVersionCommandInput, GetAgentVersionCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
- new (input: GetAgentVersionCommandInput): import("@smithy/core/client").CommandImpl<GetAgentVersionCommandInput, GetAgentVersionCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
- };
26
- /**
27
- * Gets one version of an agent, with its full configuration and its ETag.
28
- *
29
- * `version` is `draft`, `production` or the name of a pinned or published version. Production is
30
- * readable by everyone with access to the agent; the draft and pinned versions only by the people
31
- * and groups on the agent's version access grant, and anyone else gets 404.
32
- * @example
33
- * Use a bare-bones client and the command you need to make an API call.
34
- * ```javascript
35
- * import { CaitlynClient, GetAgentVersionCommand } from "@caitlyn-ai/sdk"; // ES Modules import
36
- * // const { CaitlynClient, GetAgentVersionCommand } = require("@caitlyn-ai/sdk"); // CommonJS import
37
- * // import type { CaitlynClientConfig } from "@caitlyn-ai/sdk";
38
- * const config = {}; // type is CaitlynClientConfig
39
- * const client = new CaitlynClient(config);
40
- * const input = { // GetAgentVersionInput
41
- * agentId: "STRING_VALUE", // required
42
- * version: "STRING_VALUE", // required
43
- * };
44
- * const command = new GetAgentVersionCommand(input);
45
- * const response = await client.send(command);
46
- * // { // GetAgentVersionOutput
47
- * // requestId: "STRING_VALUE",
48
- * // apiVersion: "STRING_VALUE",
49
- * // etag: "STRING_VALUE", // required
50
- * // agentId: "STRING_VALUE", // required
51
- * // name: "STRING_VALUE", // required
52
- * // source: "pin" || "publish" || "migration" || "import",
53
- * // basedOn: "STRING_VALUE",
54
- * // matchesProduction: true || false,
55
- * // createdAt: new Date("TIMESTAMP"), // required
56
- * // note: "STRING_VALUE",
57
- * // configuration: { // AgentConfiguration
58
- * // identity: "STRING_VALUE",
59
- * // instructions: "STRING_VALUE", // required
60
- * // model: "STRING_VALUE",
61
- * // knowledgeBases: [ // KnowledgeBaseBindingList
62
- * // { // KnowledgeBaseBinding
63
- * // knowledgeBaseId: "STRING_VALUE", // required
64
- * // numberOfResults: Number("int"),
65
- * // minimumScore: Number("float"),
66
- * // },
67
- * // ],
68
- * // attachments: { // AttachmentSettings
69
- * // enabled: true || false,
70
- * // maxFiles: Number("int"),
71
- * // },
72
- * // contentSafety: { // ContentSafety
73
- * // guardrailId: "STRING_VALUE",
74
- * // },
75
- * // deniedDocuments: true || false,
76
- * // },
77
- * // };
78
- *
79
- * ```
80
- *
81
- * @param GetAgentVersionCommandInput - {@link GetAgentVersionCommandInput}
82
- * @returns {@link GetAgentVersionCommandOutput}
83
- * @see {@link GetAgentVersionCommandInput} for command's `input` shape.
84
- * @see {@link GetAgentVersionCommandOutput} for command's `response` shape.
85
- * @see {@link CaitlynClientResolvedConfig | config} for CaitlynClient's `config` shape.
86
- *
87
- * @throws {@link NotFoundError} (client fault)
88
- * The record does not exist, or the caller may not see it. The two are deliberately the same, so
89
- * identifiers cannot be probed.
90
- *
91
- * @throws {@link InternalError} (server fault)
92
- * An unexpected server failure. Not retried by the SDKs.
93
- *
94
- * @throws {@link PermissionDeniedError} (client fault)
95
- * The caller may not call this operation: it lacks the permission, its credential type may not
96
- * call it, or the operation is served only on the organisation's primary workspace. Decided before
97
- * any record is read. A record the caller may not see is 404 instead.
98
- *
99
- * @throws {@link ServiceUnavailableError} (server fault)
100
- * A dependency is briefly unavailable, or the request's audit event could not be recorded; wait for
101
- * `Retry-After` and try again.
102
- *
103
- * @throws {@link TooManyRequestsError} (client fault)
104
- * Too many requests; wait for `Retry-After` and try again.
105
- *
106
- * @throws {@link UnauthenticatedError} (client fault)
107
- * No credential was sent, or it is expired or not valid.
108
- *
109
- * @throws {@link ValidationError} (client fault)
110
- * The request is malformed: a member is missing, the wrong type or out of range; it has a member,
111
- * filter or sort field the operation does not define; or its cursor is not valid for this list.
112
- *
113
- * @throws {@link CaitlynServiceException}
114
- * <p>Base exception class for all service exceptions from Caitlyn service.</p>
115
- *
116
- *
117
- * @example Read the draft before editing it
118
- * ```javascript
119
- * //
120
- * const input = {
121
- * agentId: "GHT7YRWXPL",
122
- * version: "draft"
123
- * };
124
- * const command = new GetAgentVersionCommand(input);
125
- * const response = await client.send(command);
126
- * /* response is
127
- * {
128
- * agentId: "GHT7YRWXPL",
129
- * configuration: {
130
- * identity: "You are the HR assistant for Harbour Freight staff.",
131
- * instructions: "Answer leave and pay questions from the HR policy knowledge base.",
132
- * knowledgeBases: [
133
- * {
134
- * knowledgeBaseId: "KB4T7YQ2WL",
135
- * minimumScore: 0.3,
136
- * numberOfResults: 8
137
- * }
138
- * ],
139
- * model: "claude-sonnet-5-5"
140
- * },
141
- * createdAt: "2026-11-02T03:04:05.000Z",
142
- * etag: `"draft-41"`,
143
- * matchesProduction: false,
144
- * name: "draft"
145
- * }
146
- * *\/
147
- * ```
148
- *
149
- * @example A version name that does not exist, or that the caller may not see
150
- * ```javascript
151
- * //
152
- * const input = {
153
- * agentId: "GHT7YRWXPL",
154
- * version: "v99"
155
- * };
156
- * const command = new GetAgentVersionCommand(input);
157
- * const response = await client.send(command);
158
- * /* response is
159
- * { /* metadata only *\/ }
160
- * *\/
161
- * ```
162
- *
163
- * @public
164
- */
165
- export declare class GetAgentVersionCommand extends GetAgentVersionCommand_base {
166
- /** @internal type navigation helper, not in runtime. */
167
- protected static __types: {
168
- api: {
169
- input: GetAgentVersionInput;
170
- output: GetAgentVersionOutput;
171
- };
172
- sdk: {
173
- input: GetAgentVersionCommandInput;
174
- output: GetAgentVersionCommandOutput;
175
- };
176
- };
177
- }
@@ -1,176 +0,0 @@
1
- import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
- import type { ListDocumentsInput, ListDocumentsOutput } from "../models/models_0";
3
- /**
4
- * @public
5
- */
6
- export type { __MetadataBearer };
7
- /**
8
- * @public
9
- *
10
- * The input for {@link ListDocumentsCommand}.
11
- */
12
- export interface ListDocumentsCommandInput extends ListDocumentsInput {
13
- }
14
- /**
15
- * @public
16
- *
17
- * The output of {@link ListDocumentsCommand}.
18
- */
19
- export interface ListDocumentsCommandOutput extends ListDocumentsOutput, __MetadataBearer {
20
- }
21
- declare const ListDocumentsCommand_base: {
22
- new (input: ListDocumentsCommandInput): import("@smithy/core/client").CommandImpl<ListDocumentsCommandInput, ListDocumentsCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
- new (input: ListDocumentsCommandInput): import("@smithy/core/client").CommandImpl<ListDocumentsCommandInput, ListDocumentsCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
- };
26
- /**
27
- * Lists the documents in a knowledge base, one page at a time.
28
- *
29
- * Documents are returned in a stable order that does not change between pages. Filters combine
30
- * with AND. Unlike v2, an unknown filter is refused with 400 `UNKNOWN_FILTER` instead of being
31
- * ignored, and the list can be sorted by `name`, `updatedAt` (when the document last changed) and
32
- * `byteSize` on the server; v2 sorts on the client only.
33
- * @example
34
- * Use a bare-bones client and the command you need to make an API call.
35
- * ```javascript
36
- * import { CaitlynClient, ListDocumentsCommand } from "@caitlyn-ai/sdk"; // ES Modules import
37
- * // const { CaitlynClient, ListDocumentsCommand } = 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 = { // ListDocumentsInput
42
- * knowledgeBaseId: "STRING_VALUE", // required
43
- * limit: Number("int"),
44
- * cursor: "STRING_VALUE",
45
- * sort: "STRING_VALUE",
46
- * folder: "STRING_VALUE",
47
- * status: "pending" || "processing" || "indexed" || "partially_indexed" || "failed" || "deleting",
48
- * namePrefix: "STRING_VALUE",
49
- * };
50
- * const command = new ListDocumentsCommand(input);
51
- * const response = await client.send(command);
52
- * // { // ListDocumentsOutput
53
- * // requestId: "STRING_VALUE",
54
- * // apiVersion: "STRING_VALUE",
55
- * // items: [ // DocumentList // required
56
- * // { // Document
57
- * // id: "STRING_VALUE", // required
58
- * // knowledgeBaseId: "STRING_VALUE", // required
59
- * // name: "STRING_VALUE", // required
60
- * // folder: "STRING_VALUE", // required
61
- * // status: "pending" || "processing" || "indexed" || "partially_indexed" || "failed" || "deleting", // required
62
- * // stage: "STRING_VALUE",
63
- * // contentType: "STRING_VALUE",
64
- * // byteSize: Number("long"),
65
- * // sha256: "STRING_VALUE",
66
- * // createdAt: new Date("TIMESTAMP"), // required
67
- * // updatedAt: new Date("TIMESTAMP"), // required
68
- * // partialFailures: [ // PartialFailureList
69
- * // { // PartialFailure
70
- * // targetId: "STRING_VALUE",
71
- * // code: "STRING_VALUE", // required
72
- * // detail: "STRING_VALUE",
73
- * // },
74
- * // ],
75
- * // },
76
- * // ],
77
- * // nextCursor: "STRING_VALUE",
78
- * // };
79
- *
80
- * ```
81
- *
82
- * @param ListDocumentsCommandInput - {@link ListDocumentsCommandInput}
83
- * @returns {@link ListDocumentsCommandOutput}
84
- * @see {@link ListDocumentsCommandInput} for command's `input` shape.
85
- * @see {@link ListDocumentsCommandOutput} for command's `response` shape.
86
- * @see {@link CaitlynClientResolvedConfig | config} for CaitlynClient's `config` shape.
87
- *
88
- * @throws {@link NotFoundError} (client fault)
89
- * The record does not exist, or the caller may not see it. The two are deliberately the same, so
90
- * identifiers cannot be probed.
91
- *
92
- * @throws {@link InternalError} (server fault)
93
- * An unexpected server failure. Not retried by the SDKs.
94
- *
95
- * @throws {@link PermissionDeniedError} (client fault)
96
- * The caller may not call this operation: it lacks the permission, its credential type may not
97
- * call it, or the operation is served only on the organisation's primary workspace. Decided before
98
- * any record is read. A record the caller may not see is 404 instead.
99
- *
100
- * @throws {@link ServiceUnavailableError} (server fault)
101
- * A dependency is briefly unavailable, or the request's audit event could not be recorded; wait for
102
- * `Retry-After` and try again.
103
- *
104
- * @throws {@link TooManyRequestsError} (client fault)
105
- * Too many requests; wait for `Retry-After` and try again.
106
- *
107
- * @throws {@link UnauthenticatedError} (client fault)
108
- * No credential was sent, or it is expired or not valid.
109
- *
110
- * @throws {@link ValidationError} (client fault)
111
- * The request is malformed: a member is missing, the wrong type or out of range; it has a member,
112
- * filter or sort field the operation does not define; or its cursor is not valid for this list.
113
- *
114
- * @throws {@link CaitlynServiceException}
115
- * <p>Base exception class for all service exceptions from Caitlyn service.</p>
116
- *
117
- *
118
- * @example List the HR folder's documents that finished indexing
119
- * ```javascript
120
- * //
121
- * const input = {
122
- * folder: "hr/",
123
- * knowledgeBaseId: "KB4T7YQ2WL",
124
- * limit: 2,
125
- * status: "indexed"
126
- * };
127
- * const command = new ListDocumentsCommand(input);
128
- * const response = await client.send(command);
129
- * /* response is
130
- * {
131
- * items: [
132
- * {
133
- * byteSize: 482113,
134
- * contentType: "application/pdf",
135
- * createdAt: "2026-10-01T22:10:00.000Z",
136
- * folder: "hr/",
137
- * id: "doc-3b7f9e21",
138
- * knowledgeBaseId: "KB4T7YQ2WL",
139
- * name: "Leave policy",
140
- * status: "indexed",
141
- * updatedAt: "2026-10-01T22:14:31.000Z"
142
- * }
143
- * ],
144
- * nextCursor: "c1.MEUCIQDl8z"
145
- * }
146
- * *\/
147
- * ```
148
- *
149
- * @example A knowledge base that does not exist, or that the caller may not see
150
- * ```javascript
151
- * //
152
- * const input = {
153
- * knowledgeBaseId: "KBNOPE0000"
154
- * };
155
- * const command = new ListDocumentsCommand(input);
156
- * const response = await client.send(command);
157
- * /* response is
158
- * { /* metadata only *\/ }
159
- * *\/
160
- * ```
161
- *
162
- * @public
163
- */
164
- export declare class ListDocumentsCommand extends ListDocumentsCommand_base {
165
- /** @internal type navigation helper, not in runtime. */
166
- protected static __types: {
167
- api: {
168
- input: ListDocumentsInput;
169
- output: ListDocumentsOutput;
170
- };
171
- sdk: {
172
- input: ListDocumentsCommandInput;
173
- output: ListDocumentsCommandOutput;
174
- };
175
- };
176
- }
@@ -1,146 +0,0 @@
1
- import type { MetadataBearer as __MetadataBearer, StreamingBlobPayloadOutputTypes } from "@smithy/types";
2
- import type { ResumeConversationStreamInput, ResumeConversationStreamOutput } from "../models/models_0";
3
- /**
4
- * @public
5
- */
6
- export type { __MetadataBearer };
7
- /**
8
- * @public
9
- *
10
- * The input for {@link ResumeConversationStreamCommand}.
11
- */
12
- export interface ResumeConversationStreamCommandInput extends ResumeConversationStreamInput {
13
- }
14
- /**
15
- * @public
16
- *
17
- * The output of {@link ResumeConversationStreamCommand}.
18
- */
19
- export interface ResumeConversationStreamCommandOutput extends Omit<ResumeConversationStreamOutput, "events">, __MetadataBearer {
20
- events: StreamingBlobPayloadOutputTypes;
21
- }
22
- declare const ResumeConversationStreamCommand_base: {
23
- new (input: ResumeConversationStreamCommandInput): import("@smithy/core/client").CommandImpl<ResumeConversationStreamCommandInput, ResumeConversationStreamCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
- new (input: ResumeConversationStreamCommandInput): import("@smithy/core/client").CommandImpl<ResumeConversationStreamCommandInput, ResumeConversationStreamCommandOutput, import("..").CaitlynClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
25
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
26
- };
27
- /**
28
- * Re-attaches to the answer that is being written, from the event after `Last-Event-ID`.
29
- *
30
- * Used by the SDKs after a dropped connection; callers rarely need it directly. When no answer is
31
- * being written, the stream ends at once.
32
- * @example
33
- * Use a bare-bones client and the command you need to make an API call.
34
- * ```javascript
35
- * import { CaitlynClient, ResumeConversationStreamCommand } from "@caitlyn-ai/sdk"; // ES Modules import
36
- * // const { CaitlynClient, ResumeConversationStreamCommand } = require("@caitlyn-ai/sdk"); // CommonJS import
37
- * // import type { CaitlynClientConfig } from "@caitlyn-ai/sdk";
38
- * const config = {}; // type is CaitlynClientConfig
39
- * const client = new CaitlynClient(config);
40
- * const input = { // ResumeConversationStreamInput
41
- * conversationId: "STRING_VALUE", // required
42
- * lastEventId: "STRING_VALUE",
43
- * };
44
- * const command = new ResumeConversationStreamCommand(input);
45
- * const response = await client.send(command);
46
- * // consume or destroy the stream to free the socket.
47
- * const bytes = await response.events.transformToByteArray();
48
- * // const str = await response.events.transformToString();
49
- * // response.events.destroy(); // only applicable to Node.js Readable streams.
50
- *
51
- * // { // ResumeConversationStreamOutput
52
- * // requestId: "STRING_VALUE",
53
- * // apiVersion: "STRING_VALUE",
54
- * // events: "<SdkStream>", // see \@smithy/types -> StreamingBlobPayloadOutputTypes // required
55
- * // };
56
- *
57
- * ```
58
- *
59
- * @param ResumeConversationStreamCommandInput - {@link ResumeConversationStreamCommandInput}
60
- * @returns {@link ResumeConversationStreamCommandOutput}
61
- * @see {@link ResumeConversationStreamCommandInput} for command's `input` shape.
62
- * @see {@link ResumeConversationStreamCommandOutput} for command's `response` shape.
63
- * @see {@link CaitlynClientResolvedConfig | config} for CaitlynClient's `config` shape.
64
- *
65
- * @throws {@link NotFoundError} (client fault)
66
- * The record does not exist, or the caller may not see it. The two are deliberately the same, so
67
- * identifiers cannot be probed.
68
- *
69
- * @throws {@link InternalError} (server fault)
70
- * An unexpected server failure. Not retried by the SDKs.
71
- *
72
- * @throws {@link PermissionDeniedError} (client fault)
73
- * The caller may not call this operation: it lacks the permission, its credential type may not
74
- * call it, or the operation is served only on the organisation's primary workspace. Decided before
75
- * any record is read. A record the caller may not see is 404 instead.
76
- *
77
- * @throws {@link ServiceUnavailableError} (server fault)
78
- * A dependency is briefly unavailable, or the request's audit event could not be recorded; wait for
79
- * `Retry-After` and try again.
80
- *
81
- * @throws {@link TooManyRequestsError} (client fault)
82
- * Too many requests; wait for `Retry-After` and try again.
83
- *
84
- * @throws {@link UnauthenticatedError} (client fault)
85
- * No credential was sent, or it is expired or not valid.
86
- *
87
- * @throws {@link ValidationError} (client fault)
88
- * The request is malformed: a member is missing, the wrong type or out of range; it has a member,
89
- * filter or sort field the operation does not define; or its cursor is not valid for this list.
90
- *
91
- * @throws {@link CaitlynServiceException}
92
- * <p>Base exception class for all service exceptions from Caitlyn service.</p>
93
- *
94
- *
95
- * @example Resume after a dropped connection
96
- * ```javascript
97
- * // The answer arrives as a stream of events; the example shows only the request.
98
- * const input = {
99
- * conversationId: "0193a6f2-7c4e-7b1a-9d2e-3f5a8c1b0e47",
100
- * lastEventId: "0193a6f2-9b10-7c3d-8e44-1f2a3b4c5d6e"
101
- * };
102
- * const command = new ResumeConversationStreamCommand(input);
103
- * const response = await client.send(command);
104
- * // consume or destroy the stream to free the socket.
105
- * const bytes = await response.events.transformToByteArray();
106
- * // const str = await response.events.transformToString();
107
- * // response.events.destroy(); // only applicable to Node.js Readable streams.
108
- *
109
- * /* response is
110
- * { /* metadata only *\/ }
111
- * *\/
112
- * ```
113
- *
114
- * @example A conversation that does not exist, or that the caller may not see
115
- * ```javascript
116
- * //
117
- * const input = {
118
- * conversationId: "0193a6f2-0000-7000-8000-000000000000"
119
- * };
120
- * const command = new ResumeConversationStreamCommand(input);
121
- * const response = await client.send(command);
122
- * // consume or destroy the stream to free the socket.
123
- * const bytes = await response.events.transformToByteArray();
124
- * // const str = await response.events.transformToString();
125
- * // response.events.destroy(); // only applicable to Node.js Readable streams.
126
- *
127
- * /* response is
128
- * { /* metadata only *\/ }
129
- * *\/
130
- * ```
131
- *
132
- * @public
133
- */
134
- export declare class ResumeConversationStreamCommand extends ResumeConversationStreamCommand_base {
135
- /** @internal type navigation helper, not in runtime. */
136
- protected static __types: {
137
- api: {
138
- input: ResumeConversationStreamInput;
139
- output: ResumeConversationStreamOutput;
140
- };
141
- sdk: {
142
- input: ResumeConversationStreamCommandInput;
143
- output: ResumeConversationStreamCommandOutput;
144
- };
145
- };
146
- }