@aws-sdk/client-opensearchmemory 0.0.0-stage → 3.1171.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 (157) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +320 -2
  3. package/dist-cjs/index.js +1550 -0
  4. package/dist-es/OpenSearchMemory.js +65 -0
  5. package/dist-es/OpenSearchMemoryClient.js +47 -0
  6. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  7. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  8. package/dist-es/commandBuilder.js +9 -0
  9. package/dist-es/commands/BatchGetEventCommand.js +4 -0
  10. package/dist-es/commands/CreateEventCommand.js +4 -0
  11. package/dist-es/commands/CreateMemoryCommand.js +4 -0
  12. package/dist-es/commands/CreateSpaceCommand.js +4 -0
  13. package/dist-es/commands/DeleteEventCommand.js +4 -0
  14. package/dist-es/commands/DeleteMemoryCommand.js +4 -0
  15. package/dist-es/commands/DeleteSpaceCommand.js +4 -0
  16. package/dist-es/commands/GetEventCommand.js +4 -0
  17. package/dist-es/commands/GetMemoryCommand.js +4 -0
  18. package/dist-es/commands/GetSpaceCommand.js +4 -0
  19. package/dist-es/commands/ListEventsCommand.js +4 -0
  20. package/dist-es/commands/ListMemoriesCommand.js +4 -0
  21. package/dist-es/commands/ListSpacesCommand.js +4 -0
  22. package/dist-es/commands/ListTagsForResourceCommand.js +4 -0
  23. package/dist-es/commands/SearchEventsCommand.js +4 -0
  24. package/dist-es/commands/SearchMemoriesCommand.js +4 -0
  25. package/dist-es/commands/TagResourceCommand.js +4 -0
  26. package/dist-es/commands/UntagResourceCommand.js +4 -0
  27. package/dist-es/commands/UpdateMemoryCommand.js +4 -0
  28. package/dist-es/commands/UpdateSpaceCommand.js +4 -0
  29. package/dist-es/commands/index.js +20 -0
  30. package/dist-es/endpoint/EndpointParameters.js +11 -0
  31. package/dist-es/endpoint/bdd.js +33 -0
  32. package/dist-es/endpoint/endpointResolver.js +14 -0
  33. package/dist-es/extensionConfiguration.js +1 -0
  34. package/dist-es/index.js +11 -0
  35. package/dist-es/models/OpenSearchMemoryServiceException.js +9 -0
  36. package/dist-es/models/enums.js +61 -0
  37. package/dist-es/models/errors.js +114 -0
  38. package/dist-es/models/models_0.js +1 -0
  39. package/dist-es/pagination/Interfaces.js +1 -0
  40. package/dist-es/pagination/ListEventsPaginator.js +4 -0
  41. package/dist-es/pagination/ListMemoriesPaginator.js +4 -0
  42. package/dist-es/pagination/ListSpacesPaginator.js +4 -0
  43. package/dist-es/pagination/SearchEventsPaginator.js +4 -0
  44. package/dist-es/pagination/SearchMemoriesPaginator.js +4 -0
  45. package/dist-es/pagination/index.js +6 -0
  46. package/dist-es/runtimeConfig.browser.js +29 -0
  47. package/dist-es/runtimeConfig.js +44 -0
  48. package/dist-es/runtimeConfig.native.js +9 -0
  49. package/dist-es/runtimeConfig.shared.js +40 -0
  50. package/dist-es/runtimeExtensions.js +9 -0
  51. package/dist-es/schemas/schemas_0.js +720 -0
  52. package/dist-es/waiters/index.js +2 -0
  53. package/dist-es/waiters/waitForSpaceActive.js +79 -0
  54. package/dist-es/waiters/waitForSpaceDeleted.js +52 -0
  55. package/dist-types/OpenSearchMemory.d.ts +206 -0
  56. package/dist-types/OpenSearchMemoryClient.d.ts +207 -0
  57. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  58. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  59. package/dist-types/commandBuilder.d.ts +22 -0
  60. package/dist-types/commands/BatchGetEventCommand.d.ts +140 -0
  61. package/dist-types/commands/CreateEventCommand.d.ts +134 -0
  62. package/dist-types/commands/CreateMemoryCommand.d.ts +103 -0
  63. package/dist-types/commands/CreateSpaceCommand.d.ts +122 -0
  64. package/dist-types/commands/DeleteEventCommand.d.ts +89 -0
  65. package/dist-types/commands/DeleteMemoryCommand.d.ts +89 -0
  66. package/dist-types/commands/DeleteSpaceCommand.d.ts +90 -0
  67. package/dist-types/commands/GetEventCommand.d.ts +129 -0
  68. package/dist-types/commands/GetMemoryCommand.d.ts +103 -0
  69. package/dist-types/commands/GetSpaceCommand.d.ts +113 -0
  70. package/dist-types/commands/ListEventsCommand.d.ts +105 -0
  71. package/dist-types/commands/ListMemoriesCommand.d.ts +120 -0
  72. package/dist-types/commands/ListSpacesCommand.d.ts +93 -0
  73. package/dist-types/commands/ListTagsForResourceCommand.d.ts +91 -0
  74. package/dist-types/commands/SearchEventsCommand.d.ts +110 -0
  75. package/dist-types/commands/SearchMemoriesCommand.d.ts +120 -0
  76. package/dist-types/commands/TagResourceCommand.d.ts +90 -0
  77. package/dist-types/commands/UntagResourceCommand.d.ts +87 -0
  78. package/dist-types/commands/UpdateMemoryCommand.d.ts +111 -0
  79. package/dist-types/commands/UpdateSpaceCommand.d.ts +112 -0
  80. package/dist-types/commands/index.d.ts +20 -0
  81. package/dist-types/endpoint/EndpointParameters.d.ts +45 -0
  82. package/dist-types/endpoint/bdd.d.ts +2 -0
  83. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  84. package/dist-types/extensionConfiguration.d.ts +9 -0
  85. package/dist-types/index.d.ts +19 -0
  86. package/dist-types/models/OpenSearchMemoryServiceException.d.ts +15 -0
  87. package/dist-types/models/enums.d.ts +258 -0
  88. package/dist-types/models/errors.d.ts +144 -0
  89. package/dist-types/models/models_0.d.ts +1629 -0
  90. package/dist-types/pagination/Interfaces.d.ts +8 -0
  91. package/dist-types/pagination/ListEventsPaginator.d.ts +7 -0
  92. package/dist-types/pagination/ListMemoriesPaginator.d.ts +7 -0
  93. package/dist-types/pagination/ListSpacesPaginator.d.ts +7 -0
  94. package/dist-types/pagination/SearchEventsPaginator.d.ts +7 -0
  95. package/dist-types/pagination/SearchMemoriesPaginator.d.ts +7 -0
  96. package/dist-types/pagination/index.d.ts +6 -0
  97. package/dist-types/runtimeConfig.browser.d.ts +57 -0
  98. package/dist-types/runtimeConfig.d.ts +58 -0
  99. package/dist-types/runtimeConfig.native.d.ts +56 -0
  100. package/dist-types/runtimeConfig.shared.d.ts +28 -0
  101. package/dist-types/runtimeExtensions.d.ts +17 -0
  102. package/dist-types/schemas/schemas_0.d.ts +105 -0
  103. package/dist-types/ts3.4/OpenSearchMemory.d.ts +371 -0
  104. package/dist-types/ts3.4/OpenSearchMemoryClient.d.ts +190 -0
  105. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +25 -0
  106. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
  107. package/dist-types/ts3.4/commandBuilder.d.ts +41 -0
  108. package/dist-types/ts3.4/commands/BatchGetEventCommand.d.ts +38 -0
  109. package/dist-types/ts3.4/commands/CreateEventCommand.d.ts +38 -0
  110. package/dist-types/ts3.4/commands/CreateMemoryCommand.d.ts +38 -0
  111. package/dist-types/ts3.4/commands/CreateSpaceCommand.d.ts +38 -0
  112. package/dist-types/ts3.4/commands/DeleteEventCommand.d.ts +38 -0
  113. package/dist-types/ts3.4/commands/DeleteMemoryCommand.d.ts +38 -0
  114. package/dist-types/ts3.4/commands/DeleteSpaceCommand.d.ts +38 -0
  115. package/dist-types/ts3.4/commands/GetEventCommand.d.ts +38 -0
  116. package/dist-types/ts3.4/commands/GetMemoryCommand.d.ts +38 -0
  117. package/dist-types/ts3.4/commands/GetSpaceCommand.d.ts +38 -0
  118. package/dist-types/ts3.4/commands/ListEventsCommand.d.ts +38 -0
  119. package/dist-types/ts3.4/commands/ListMemoriesCommand.d.ts +38 -0
  120. package/dist-types/ts3.4/commands/ListSpacesCommand.d.ts +38 -0
  121. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  122. package/dist-types/ts3.4/commands/SearchEventsCommand.d.ts +38 -0
  123. package/dist-types/ts3.4/commands/SearchMemoriesCommand.d.ts +38 -0
  124. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +38 -0
  125. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
  126. package/dist-types/ts3.4/commands/UpdateMemoryCommand.d.ts +38 -0
  127. package/dist-types/ts3.4/commands/UpdateSpaceCommand.d.ts +38 -0
  128. package/dist-types/ts3.4/commands/index.d.ts +20 -0
  129. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +46 -0
  130. package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
  131. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  132. package/dist-types/ts3.4/extensionConfiguration.d.ts +10 -0
  133. package/dist-types/ts3.4/index.d.ts +14 -0
  134. package/dist-types/ts3.4/models/OpenSearchMemoryServiceException.d.ts +10 -0
  135. package/dist-types/ts3.4/models/enums.d.ts +73 -0
  136. package/dist-types/ts3.4/models/errors.d.ts +59 -0
  137. package/dist-types/ts3.4/models/models_0.d.ts +459 -0
  138. package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
  139. package/dist-types/ts3.4/pagination/ListEventsPaginator.d.ts +8 -0
  140. package/dist-types/ts3.4/pagination/ListMemoriesPaginator.d.ts +11 -0
  141. package/dist-types/ts3.4/pagination/ListSpacesPaginator.d.ts +8 -0
  142. package/dist-types/ts3.4/pagination/SearchEventsPaginator.d.ts +11 -0
  143. package/dist-types/ts3.4/pagination/SearchMemoriesPaginator.d.ts +11 -0
  144. package/dist-types/ts3.4/pagination/index.d.ts +6 -0
  145. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  146. package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
  147. package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
  148. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +31 -0
  149. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  150. package/dist-types/ts3.4/schemas/schemas_0.d.ts +105 -0
  151. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  152. package/dist-types/ts3.4/waiters/waitForSpaceActive.d.ts +12 -0
  153. package/dist-types/ts3.4/waiters/waitForSpaceDeleted.d.ts +13 -0
  154. package/dist-types/waiters/index.d.ts +2 -0
  155. package/dist-types/waiters/waitForSpaceActive.d.ts +15 -0
  156. package/dist-types/waiters/waitForSpaceDeleted.d.ts +16 -0
  157. package/package.json +67 -4
@@ -0,0 +1,22 @@
1
+ import type { EndpointParameterInstructions } from "@smithy/types";
2
+ import type { OpenSearchMemoryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "./OpenSearchMemoryClient";
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, OpenSearchMemoryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
8
+ new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, OpenSearchMemoryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
9
+ getEndpointParameterInstructions(): EndpointParameterInstructions;
10
+ };
11
+ /**
12
+ * @internal
13
+ */
14
+ export declare const _ep0: EndpointParameterInstructions;
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const _ep1: EndpointParameterInstructions;
19
+ /**
20
+ * @internal
21
+ */
22
+ export declare const _mw0: (Command: any, cs: any, config: any, o: any) => never[];
@@ -0,0 +1,140 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { BatchGetEventInput, BatchGetEventOutput } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link BatchGetEventCommand}.
11
+ */
12
+ export interface BatchGetEventCommandInput extends BatchGetEventInput {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link BatchGetEventCommand}.
18
+ */
19
+ export interface BatchGetEventCommandOutput extends BatchGetEventOutput, __MetadataBearer {
20
+ }
21
+ declare const BatchGetEventCommand_base: {
22
+ new (input: BatchGetEventCommandInput): import("@smithy/core/client").CommandImpl<BatchGetEventCommandInput, BatchGetEventCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: BatchGetEventCommandInput): import("@smithy/core/client").CommandImpl<BatchGetEventCommandInput, BatchGetEventCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Gets up to 10 events by ID, each as <code>GetEvent</code> returns it, including its payload.</p> <p>If you supply <code>actorId</code> or <code>sessionId</code>, every requested event must match it. Each event has its own outcome. The operation reports an event that it can't return in <code>errors</code> instead of failing, with an error code named for the exception that <code>GetEvent</code> would return for it. The operation reports both an event that doesn't exist and an event outside the supplied scope as <code>RESOURCE_NOT_FOUND</code>.</p> <p>The exception is the space's customer managed AWS KMS key: if it is disabled, pending deletion, can't be used for decryption, or was deleted, the whole call fails with <code>ValidationException</code>, as <code>GetEvent</code> does.</p>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { OpenSearchMemoryClient, BatchGetEventCommand } from "@aws-sdk/client-opensearchmemory"; // ES Modules import
32
+ * // const { OpenSearchMemoryClient, BatchGetEventCommand } = require("@aws-sdk/client-opensearchmemory"); // CommonJS import
33
+ * // import type { OpenSearchMemoryClientConfig } from "@aws-sdk/client-opensearchmemory";
34
+ * const config = {}; // type is OpenSearchMemoryClientConfig
35
+ * const client = new OpenSearchMemoryClient(config);
36
+ * const input = { // BatchGetEventInput
37
+ * spaceId: "STRING_VALUE", // required
38
+ * actorId: "STRING_VALUE",
39
+ * sessionId: "STRING_VALUE",
40
+ * eventIds: [ // BatchGetEventIdList // required
41
+ * "STRING_VALUE",
42
+ * ],
43
+ * };
44
+ * const command = new BatchGetEventCommand(input);
45
+ * const response = await client.send(command);
46
+ * // { // BatchGetEventOutput
47
+ * // events: [ // EventList // required
48
+ * // { // Event
49
+ * // eventId: "STRING_VALUE", // required
50
+ * // spaceId: "STRING_VALUE", // required
51
+ * // actorId: "STRING_VALUE", // required
52
+ * // sessionId: "STRING_VALUE", // required
53
+ * // payload: { // EventPayload Union: only one key present
54
+ * // conversational: { // ConversationalPayload Union: only one key present
55
+ * // unified: { // UnifiedConversational
56
+ * // source: { // UnifiedConversationalSource Union: only one key present
57
+ * // object: { // UnifiedConversationalObject
58
+ * // messages: [ // MessageList // required
59
+ * // { // Message
60
+ * // role: "USER" || "ASSISTANT" || "SYSTEM", // required
61
+ * // content: { // MessageContent
62
+ * // text: "STRING_VALUE", // required
63
+ * // },
64
+ * // },
65
+ * // ],
66
+ * // },
67
+ * // },
68
+ * // },
69
+ * // },
70
+ * // structuredData: { // StructuredDataPayload
71
+ * // source: { // StructuredDataSource Union: only one key present
72
+ * // json: "DOCUMENT_VALUE",
73
+ * // },
74
+ * // },
75
+ * // blob: { // BlobPayload
76
+ * // contentType: "application/pdf" || "image/png" || "image/jpeg", // required
77
+ * // source: { // BlobSource Union: only one key present
78
+ * // s3Location: { // S3Location
79
+ * // uri: "STRING_VALUE", // required
80
+ * // },
81
+ * // },
82
+ * // },
83
+ * // },
84
+ * // metadata: { // MetadataMap
85
+ * // "<keys>": "STRING_VALUE",
86
+ * // },
87
+ * // eventTimestamp: new Date("TIMESTAMP"), // required
88
+ * // },
89
+ * // ],
90
+ * // errors: [ // BatchGetEventErrorList // required
91
+ * // { // BatchGetEventError
92
+ * // eventId: "STRING_VALUE", // required
93
+ * // errorCode: "RESOURCE_NOT_FOUND" || "THROTTLING" || "ACCESS_DENIED" || "INTERNAL_SERVER", // required
94
+ * // message: "STRING_VALUE", // required
95
+ * // },
96
+ * // ],
97
+ * // };
98
+ *
99
+ * ```
100
+ *
101
+ * @param BatchGetEventCommandInput - {@link BatchGetEventCommandInput}
102
+ * @returns {@link BatchGetEventCommandOutput}
103
+ * @see {@link BatchGetEventCommandInput} for command's `input` shape.
104
+ * @see {@link BatchGetEventCommandOutput} for command's `response` shape.
105
+ * @see {@link OpenSearchMemoryClientResolvedConfig | config} for OpenSearchMemoryClient's `config` shape.
106
+ *
107
+ * @throws {@link AccessDeniedException} (client fault)
108
+ * <p>You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
109
+ *
110
+ * @throws {@link InternalServerException} (server fault)
111
+ * <p>The service couldn't process the request because of an internal error. Retry the request.</p>
112
+ *
113
+ * @throws {@link ResourceNotFoundException} (client fault)
114
+ * <p>The specified resource doesn't exist. Check the IDs in the request.</p>
115
+ *
116
+ * @throws {@link ThrottlingException} (client fault)
117
+ * <p>The service throttled the request. Retry the request with exponential backoff.</p>
118
+ *
119
+ * @throws {@link ValidationException} (client fault)
120
+ * <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</p>
121
+ *
122
+ * @throws {@link OpenSearchMemoryServiceException}
123
+ * <p>Base exception class for all service exceptions from OpenSearchMemory service.</p>
124
+ *
125
+ *
126
+ * @public
127
+ */
128
+ export declare class BatchGetEventCommand extends BatchGetEventCommand_base {
129
+ /** @internal type navigation helper, not in runtime. */
130
+ protected static __types: {
131
+ api: {
132
+ input: BatchGetEventInput;
133
+ output: BatchGetEventOutput;
134
+ };
135
+ sdk: {
136
+ input: BatchGetEventCommandInput;
137
+ output: BatchGetEventCommandOutput;
138
+ };
139
+ };
140
+ }
@@ -0,0 +1,134 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { CreateEventInput, CreateEventOutput } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link CreateEventCommand}.
11
+ */
12
+ export interface CreateEventCommandInput extends CreateEventInput {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link CreateEventCommand}.
18
+ */
19
+ export interface CreateEventCommandOutput extends CreateEventOutput, __MetadataBearer {
20
+ }
21
+ declare const CreateEventCommand_base: {
22
+ new (input: CreateEventCommandInput): import("@smithy/core/client").CommandImpl<CreateEventCommandInput, CreateEventCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: CreateEventCommandInput): import("@smithy/core/client").CommandImpl<CreateEventCommandInput, CreateEventCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Submits an event (conversation turns, structured data, or a PDF document stored in Amazon S3) to a session in a space.</p> <p>The operation returns as soon as the event is saved. <code>GetEvent</code> and <code>ListEvents</code> return it immediately. <code>SearchEvents</code> returns it after it's indexed. <code>SearchMemories</code> returns memories extracted from it only after a strategy's extraction trigger fires and the memories are indexed.</p> <p>If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with <code>AccessDeniedException</code> if you aren't allowed to use the key, and with <code>ThrottlingException</code> if AWS KMS throttles the request. It fails with <code>ValidationException</code> if the key is disabled, pending deletion, or deleted.</p>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { OpenSearchMemoryClient, CreateEventCommand } from "@aws-sdk/client-opensearchmemory"; // ES Modules import
32
+ * // const { OpenSearchMemoryClient, CreateEventCommand } = require("@aws-sdk/client-opensearchmemory"); // CommonJS import
33
+ * // import type { OpenSearchMemoryClientConfig } from "@aws-sdk/client-opensearchmemory";
34
+ * const config = {}; // type is OpenSearchMemoryClientConfig
35
+ * const client = new OpenSearchMemoryClient(config);
36
+ * const input = { // CreateEventInput
37
+ * spaceId: "STRING_VALUE", // required
38
+ * actorId: "STRING_VALUE", // required
39
+ * sessionId: "STRING_VALUE",
40
+ * eventTimestamp: new Date("TIMESTAMP"),
41
+ * payload: { // EventPayload Union: only one key present
42
+ * conversational: { // ConversationalPayload Union: only one key present
43
+ * unified: { // UnifiedConversational
44
+ * source: { // UnifiedConversationalSource Union: only one key present
45
+ * object: { // UnifiedConversationalObject
46
+ * messages: [ // MessageList // required
47
+ * { // Message
48
+ * role: "USER" || "ASSISTANT" || "SYSTEM", // required
49
+ * content: { // MessageContent
50
+ * text: "STRING_VALUE", // required
51
+ * },
52
+ * },
53
+ * ],
54
+ * },
55
+ * },
56
+ * },
57
+ * },
58
+ * structuredData: { // StructuredDataPayload
59
+ * source: { // StructuredDataSource Union: only one key present
60
+ * json: "DOCUMENT_VALUE",
61
+ * },
62
+ * },
63
+ * blob: { // BlobPayload
64
+ * contentType: "application/pdf" || "image/png" || "image/jpeg", // required
65
+ * source: { // BlobSource Union: only one key present
66
+ * s3Location: { // S3Location
67
+ * uri: "STRING_VALUE", // required
68
+ * },
69
+ * },
70
+ * },
71
+ * },
72
+ * metadata: { // MetadataMap
73
+ * "<keys>": "STRING_VALUE",
74
+ * },
75
+ * clientToken: "STRING_VALUE",
76
+ * infer: true || false,
77
+ * };
78
+ * const command = new CreateEventCommand(input);
79
+ * const response = await client.send(command);
80
+ * // { // CreateEventOutput
81
+ * // event: { // EventDetail
82
+ * // eventId: "STRING_VALUE", // required
83
+ * // spaceId: "STRING_VALUE", // required
84
+ * // actorId: "STRING_VALUE", // required
85
+ * // sessionId: "STRING_VALUE", // required
86
+ * // eventTimestamp: new Date("TIMESTAMP"), // required
87
+ * // },
88
+ * // };
89
+ *
90
+ * ```
91
+ *
92
+ * @param CreateEventCommandInput - {@link CreateEventCommandInput}
93
+ * @returns {@link CreateEventCommandOutput}
94
+ * @see {@link CreateEventCommandInput} for command's `input` shape.
95
+ * @see {@link CreateEventCommandOutput} for command's `response` shape.
96
+ * @see {@link OpenSearchMemoryClientResolvedConfig | config} for OpenSearchMemoryClient's `config` shape.
97
+ *
98
+ * @throws {@link AccessDeniedException} (client fault)
99
+ * <p>You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
100
+ *
101
+ * @throws {@link ConflictException} (client fault)
102
+ * <p>The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.</p>
103
+ *
104
+ * @throws {@link InternalServerException} (server fault)
105
+ * <p>The service couldn't process the request because of an internal error. Retry the request.</p>
106
+ *
107
+ * @throws {@link ResourceNotFoundException} (client fault)
108
+ * <p>The specified resource doesn't exist. Check the IDs in the request.</p>
109
+ *
110
+ * @throws {@link ThrottlingException} (client fault)
111
+ * <p>The service throttled the request. Retry the request with exponential backoff.</p>
112
+ *
113
+ * @throws {@link ValidationException} (client fault)
114
+ * <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</p>
115
+ *
116
+ * @throws {@link OpenSearchMemoryServiceException}
117
+ * <p>Base exception class for all service exceptions from OpenSearchMemory service.</p>
118
+ *
119
+ *
120
+ * @public
121
+ */
122
+ export declare class CreateEventCommand extends CreateEventCommand_base {
123
+ /** @internal type navigation helper, not in runtime. */
124
+ protected static __types: {
125
+ api: {
126
+ input: CreateEventInput;
127
+ output: CreateEventOutput;
128
+ };
129
+ sdk: {
130
+ input: CreateEventCommandInput;
131
+ output: CreateEventCommandOutput;
132
+ };
133
+ };
134
+ }
@@ -0,0 +1,103 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { CreateMemoryInput, CreateMemoryOutput } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link CreateMemoryCommand}.
11
+ */
12
+ export interface CreateMemoryCommandInput extends CreateMemoryInput {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link CreateMemoryCommand}.
18
+ */
19
+ export interface CreateMemoryCommandOutput extends CreateMemoryOutput, __MetadataBearer {
20
+ }
21
+ declare const CreateMemoryCommand_base: {
22
+ new (input: CreateMemoryCommandInput): import("@smithy/core/client").CommandImpl<CreateMemoryCommandInput, CreateMemoryCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: CreateMemoryCommandInput): import("@smithy/core/client").CommandImpl<CreateMemoryCommandInput, CreateMemoryCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Writes a memory that you have already formed, without extracting it from events. The service embeds the text as given and stores it as a memory of the named strategy. To have the service extract memories from conversation turns, use <code>CreateEvent</code> instead.</p> <p>The operation returns before the memory is searchable. The returned <code>memoryId</code> is final, but until the memory is indexed, <code>GetMemory</code>, <code>UpdateMemory</code>, and <code>DeleteMemory</code> return <code>ResourceNotFoundException</code> for it.</p> <p>If the request would exceed the service's rate for embedding requests, it fails with <code>ThrottlingException</code>. Retry with exponential backoff.</p> <p>If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with <code>AccessDeniedException</code> if you aren't allowed to use the key, and with <code>ThrottlingException</code> if AWS KMS throttles the request. It fails with <code>ValidationException</code> if the key is disabled, pending deletion, or deleted.</p>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { OpenSearchMemoryClient, CreateMemoryCommand } from "@aws-sdk/client-opensearchmemory"; // ES Modules import
32
+ * // const { OpenSearchMemoryClient, CreateMemoryCommand } = require("@aws-sdk/client-opensearchmemory"); // CommonJS import
33
+ * // import type { OpenSearchMemoryClientConfig } from "@aws-sdk/client-opensearchmemory";
34
+ * const config = {}; // type is OpenSearchMemoryClientConfig
35
+ * const client = new OpenSearchMemoryClient(config);
36
+ * const input = { // CreateMemoryInput
37
+ * spaceId: "STRING_VALUE", // required
38
+ * name: "STRING_VALUE", // required
39
+ * content: "STRING_VALUE", // required
40
+ * actorId: "STRING_VALUE", // required
41
+ * sessionId: "STRING_VALUE",
42
+ * metadata: { // MetadataMap
43
+ * "<keys>": "STRING_VALUE",
44
+ * },
45
+ * clientToken: "STRING_VALUE",
46
+ * };
47
+ * const command = new CreateMemoryCommand(input);
48
+ * const response = await client.send(command);
49
+ * // { // CreateMemoryOutput
50
+ * // memory: { // CreateMemoryDetail
51
+ * // memoryId: "STRING_VALUE", // required
52
+ * // spaceId: "STRING_VALUE", // required
53
+ * // name: "STRING_VALUE", // required
54
+ * // actorId: "STRING_VALUE", // required
55
+ * // sessionId: "STRING_VALUE", // required
56
+ * // },
57
+ * // };
58
+ *
59
+ * ```
60
+ *
61
+ * @param CreateMemoryCommandInput - {@link CreateMemoryCommandInput}
62
+ * @returns {@link CreateMemoryCommandOutput}
63
+ * @see {@link CreateMemoryCommandInput} for command's `input` shape.
64
+ * @see {@link CreateMemoryCommandOutput} for command's `response` shape.
65
+ * @see {@link OpenSearchMemoryClientResolvedConfig | config} for OpenSearchMemoryClient's `config` shape.
66
+ *
67
+ * @throws {@link AccessDeniedException} (client fault)
68
+ * <p>You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
69
+ *
70
+ * @throws {@link ConflictException} (client fault)
71
+ * <p>The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.</p>
72
+ *
73
+ * @throws {@link InternalServerException} (server fault)
74
+ * <p>The service couldn't process the request because of an internal error. Retry the request.</p>
75
+ *
76
+ * @throws {@link ResourceNotFoundException} (client fault)
77
+ * <p>The specified resource doesn't exist. Check the IDs in the request.</p>
78
+ *
79
+ * @throws {@link ThrottlingException} (client fault)
80
+ * <p>The service throttled the request. Retry the request with exponential backoff.</p>
81
+ *
82
+ * @throws {@link ValidationException} (client fault)
83
+ * <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</p>
84
+ *
85
+ * @throws {@link OpenSearchMemoryServiceException}
86
+ * <p>Base exception class for all service exceptions from OpenSearchMemory service.</p>
87
+ *
88
+ *
89
+ * @public
90
+ */
91
+ export declare class CreateMemoryCommand extends CreateMemoryCommand_base {
92
+ /** @internal type navigation helper, not in runtime. */
93
+ protected static __types: {
94
+ api: {
95
+ input: CreateMemoryInput;
96
+ output: CreateMemoryOutput;
97
+ };
98
+ sdk: {
99
+ input: CreateMemoryCommandInput;
100
+ output: CreateMemoryCommandOutput;
101
+ };
102
+ };
103
+ }
@@ -0,0 +1,122 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { CreateSpaceRequest, CreateSpaceResponse } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link CreateSpaceCommand}.
11
+ */
12
+ export interface CreateSpaceCommandInput extends CreateSpaceRequest {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link CreateSpaceCommand}.
18
+ */
19
+ export interface CreateSpaceCommandOutput extends CreateSpaceResponse, __MetadataBearer {
20
+ }
21
+ declare const CreateSpaceCommand_base: {
22
+ new (input: CreateSpaceCommandInput): import("@smithy/core/client").CommandImpl<CreateSpaceCommandInput, CreateSpaceCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: CreateSpaceCommandInput): import("@smithy/core/client").CommandImpl<CreateSpaceCommandInput, CreateSpaceCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Creates a space. A space is an AWS resource that stores the events you send and the memories extracted from them, and defines the memory strategies that extract those memories.</p> <p>The operation returns before provisioning finishes, with <code>status</code> <code>CREATING</code>. Call <code>GetSpace</code> until the status is <code>ACTIVE</code>, and then use the space. If provisioning fails, the status becomes <code>FAILED</code> and <code>statusReason</code> says why.</p>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { OpenSearchMemoryClient, CreateSpaceCommand } from "@aws-sdk/client-opensearchmemory"; // ES Modules import
32
+ * // const { OpenSearchMemoryClient, CreateSpaceCommand } = require("@aws-sdk/client-opensearchmemory"); // CommonJS import
33
+ * // import type { OpenSearchMemoryClientConfig } from "@aws-sdk/client-opensearchmemory";
34
+ * const config = {}; // type is OpenSearchMemoryClientConfig
35
+ * const client = new OpenSearchMemoryClient(config);
36
+ * const input = { // CreateSpaceRequest
37
+ * name: "STRING_VALUE", // required
38
+ * memoryStrategies: [ // MemoryStrategyList
39
+ * { // MemoryStrategy
40
+ * type: "SEMANTIC" || "SUMMARY" || "CUSTOM", // required
41
+ * name: "STRING_VALUE",
42
+ * description: "STRING_VALUE",
43
+ * configuration: { // MemoryStrategyConfiguration
44
+ * extractionPrompt: "STRING_VALUE",
45
+ * extractEveryNMessages: Number("int"),
46
+ * extractEveryNTokens: Number("int"),
47
+ * idleTimeoutSeconds: Number("int"),
48
+ * extractionSeedTopK: Number("int"),
49
+ * extractionSeedRecentN: Number("int"),
50
+ * consolidationEnabled: true || false,
51
+ * },
52
+ * },
53
+ * ],
54
+ * eventExpiryDays: Number("int"),
55
+ * memoryExpiryDays: Number("int"),
56
+ * extractionModelId: "STRING_VALUE",
57
+ * encryptionConfiguration: { // EncryptionConfiguration
58
+ * kmsKeyArn: "STRING_VALUE",
59
+ * },
60
+ * tags: [ // TagList
61
+ * { // Tag
62
+ * key: "STRING_VALUE", // required
63
+ * value: "STRING_VALUE", // required
64
+ * },
65
+ * ],
66
+ * clientToken: "STRING_VALUE",
67
+ * };
68
+ * const command = new CreateSpaceCommand(input);
69
+ * const response = await client.send(command);
70
+ * // { // CreateSpaceResponse
71
+ * // spaceId: "STRING_VALUE", // required
72
+ * // arn: "STRING_VALUE", // required
73
+ * // name: "STRING_VALUE", // required
74
+ * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "DELETED" || "FAILED", // required
75
+ * // createdAt: new Date("TIMESTAMP"), // required
76
+ * // };
77
+ *
78
+ * ```
79
+ *
80
+ * @param CreateSpaceCommandInput - {@link CreateSpaceCommandInput}
81
+ * @returns {@link CreateSpaceCommandOutput}
82
+ * @see {@link CreateSpaceCommandInput} for command's `input` shape.
83
+ * @see {@link CreateSpaceCommandOutput} for command's `response` shape.
84
+ * @see {@link OpenSearchMemoryClientResolvedConfig | config} for OpenSearchMemoryClient's `config` shape.
85
+ *
86
+ * @throws {@link AccessDeniedException} (client fault)
87
+ * <p>You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
88
+ *
89
+ * @throws {@link ConflictException} (client fault)
90
+ * <p>The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.</p>
91
+ *
92
+ * @throws {@link InternalServerException} (server fault)
93
+ * <p>The service couldn't process the request because of an internal error. Retry the request.</p>
94
+ *
95
+ * @throws {@link ServiceQuotaExceededException} (client fault)
96
+ * <p>The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.</p>
97
+ *
98
+ * @throws {@link ThrottlingException} (client fault)
99
+ * <p>The service throttled the request. Retry the request with exponential backoff.</p>
100
+ *
101
+ * @throws {@link ValidationException} (client fault)
102
+ * <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</p>
103
+ *
104
+ * @throws {@link OpenSearchMemoryServiceException}
105
+ * <p>Base exception class for all service exceptions from OpenSearchMemory service.</p>
106
+ *
107
+ *
108
+ * @public
109
+ */
110
+ export declare class CreateSpaceCommand extends CreateSpaceCommand_base {
111
+ /** @internal type navigation helper, not in runtime. */
112
+ protected static __types: {
113
+ api: {
114
+ input: CreateSpaceRequest;
115
+ output: CreateSpaceResponse;
116
+ };
117
+ sdk: {
118
+ input: CreateSpaceCommandInput;
119
+ output: CreateSpaceCommandOutput;
120
+ };
121
+ };
122
+ }
@@ -0,0 +1,89 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { DeleteEventInput, DeleteEventOutput } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link DeleteEventCommand}.
11
+ */
12
+ export interface DeleteEventCommandInput extends DeleteEventInput {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link DeleteEventCommand}.
18
+ */
19
+ export interface DeleteEventCommandOutput extends DeleteEventOutput, __MetadataBearer {
20
+ }
21
+ declare const DeleteEventCommand_base: {
22
+ new (input: DeleteEventCommandInput): import("@smithy/core/client").CommandImpl<DeleteEventCommandInput, DeleteEventCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: DeleteEventCommandInput): import("@smithy/core/client").CommandImpl<DeleteEventCommandInput, DeleteEventCommandOutput, import("..").OpenSearchMemoryClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Deletes an event. Deletion can't be undone. The event stops appearing in <code>SearchEvents</code> results shortly after you delete it. Deleting an event that doesn't exist returns <code>ResourceNotFoundException</code>.</p> <p>Deleting an event doesn't delete the memories derived from it, because a memory can combine content from several events. To remove them, use <code>DeleteMemory</code>.</p> <p>If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with <code>AccessDeniedException</code> if you aren't allowed to use the key, and with <code>ThrottlingException</code> if AWS KMS throttles the request. It fails with <code>ValidationException</code> if the key is disabled, pending deletion, or deleted.</p>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { OpenSearchMemoryClient, DeleteEventCommand } from "@aws-sdk/client-opensearchmemory"; // ES Modules import
32
+ * // const { OpenSearchMemoryClient, DeleteEventCommand } = require("@aws-sdk/client-opensearchmemory"); // CommonJS import
33
+ * // import type { OpenSearchMemoryClientConfig } from "@aws-sdk/client-opensearchmemory";
34
+ * const config = {}; // type is OpenSearchMemoryClientConfig
35
+ * const client = new OpenSearchMemoryClient(config);
36
+ * const input = { // DeleteEventInput
37
+ * spaceId: "STRING_VALUE", // required
38
+ * eventId: "STRING_VALUE", // required
39
+ * actorId: "STRING_VALUE",
40
+ * sessionId: "STRING_VALUE",
41
+ * };
42
+ * const command = new DeleteEventCommand(input);
43
+ * const response = await client.send(command);
44
+ * // { // DeleteEventOutput
45
+ * // eventId: "STRING_VALUE", // required
46
+ * // };
47
+ *
48
+ * ```
49
+ *
50
+ * @param DeleteEventCommandInput - {@link DeleteEventCommandInput}
51
+ * @returns {@link DeleteEventCommandOutput}
52
+ * @see {@link DeleteEventCommandInput} for command's `input` shape.
53
+ * @see {@link DeleteEventCommandOutput} for command's `response` shape.
54
+ * @see {@link OpenSearchMemoryClientResolvedConfig | config} for OpenSearchMemoryClient's `config` shape.
55
+ *
56
+ * @throws {@link AccessDeniedException} (client fault)
57
+ * <p>You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
58
+ *
59
+ * @throws {@link InternalServerException} (server fault)
60
+ * <p>The service couldn't process the request because of an internal error. Retry the request.</p>
61
+ *
62
+ * @throws {@link ResourceNotFoundException} (client fault)
63
+ * <p>The specified resource doesn't exist. Check the IDs in the request.</p>
64
+ *
65
+ * @throws {@link ThrottlingException} (client fault)
66
+ * <p>The service throttled the request. Retry the request with exponential backoff.</p>
67
+ *
68
+ * @throws {@link ValidationException} (client fault)
69
+ * <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</p>
70
+ *
71
+ * @throws {@link OpenSearchMemoryServiceException}
72
+ * <p>Base exception class for all service exceptions from OpenSearchMemory service.</p>
73
+ *
74
+ *
75
+ * @public
76
+ */
77
+ export declare class DeleteEventCommand extends DeleteEventCommand_base {
78
+ /** @internal type navigation helper, not in runtime. */
79
+ protected static __types: {
80
+ api: {
81
+ input: DeleteEventInput;
82
+ output: DeleteEventOutput;
83
+ };
84
+ sdk: {
85
+ input: DeleteEventCommandInput;
86
+ output: DeleteEventCommandOutput;
87
+ };
88
+ };
89
+ }