@gomomento/sdk-core 1.79.0 → 1.81.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 (59) hide show
  1. package/dist/src/auth/credential-provider.d.ts +0 -6
  2. package/dist/src/auth/credential-provider.js +2 -10
  3. package/dist/src/clients/ICacheClient.d.ts +2 -1
  4. package/dist/src/clients/ICacheClient.js +1 -1
  5. package/dist/src/index.d.ts +0 -8
  6. package/dist/src/index.js +4 -18
  7. package/dist/src/internal/clients/cache/AbstractCacheClient.d.ts +9 -4
  8. package/dist/src/internal/clients/cache/AbstractCacheClient.js +11 -6
  9. package/dist/src/internal/clients/cache/IDataClient.d.ts +3 -3
  10. package/dist/src/internal/clients/cache/IDataClient.js +1 -1
  11. package/dist/src/internal/clients/index.d.ts +0 -1
  12. package/dist/src/internal/clients/index.js +1 -2
  13. package/dist/src/internal/utils/auth.d.ts +0 -2
  14. package/dist/src/internal/utils/auth.js +1 -3
  15. package/dist/src/internal/utils/validators.d.ts +1 -1
  16. package/dist/src/internal/utils/validators.js +4 -4
  17. package/dist/src/messages/responses/cache-batch-get.d.ts +5 -0
  18. package/dist/src/messages/responses/cache-batch-get.js +13 -1
  19. package/dist/src/utils/cache-call-options.d.ts +3 -1
  20. package/dist/src/utils/cache-call-options.js +1 -1
  21. package/package.json +1 -1
  22. package/dist/src/clients/IVectorIndexClient.d.ts +0 -47
  23. package/dist/src/clients/IVectorIndexClient.js +0 -12
  24. package/dist/src/internal/clients/vector/AbstractVectorIndexClient.d.ts +0 -142
  25. package/dist/src/internal/clients/vector/AbstractVectorIndexClient.js +0 -163
  26. package/dist/src/internal/clients/vector/IVectorIndexControlClient.d.ts +0 -26
  27. package/dist/src/internal/clients/vector/IVectorIndexControlClient.js +0 -25
  28. package/dist/src/internal/clients/vector/IVectorIndexDataClient.d.ts +0 -13
  29. package/dist/src/internal/clients/vector/IVectorIndexDataClient.js +0 -3
  30. package/dist/src/internal/clients/vector/index.d.ts +0 -3
  31. package/dist/src/internal/clients/vector/index.js +0 -20
  32. package/dist/src/messages/responses/vector/create-vector-index.d.ts +0 -67
  33. package/dist/src/messages/responses/vector/create-vector-index.js +0 -61
  34. package/dist/src/messages/responses/vector/delete-vector-index.d.ts +0 -61
  35. package/dist/src/messages/responses/vector/delete-vector-index.js +0 -54
  36. package/dist/src/messages/responses/vector/index.d.ts +0 -10
  37. package/dist/src/messages/responses/vector/index.js +0 -14
  38. package/dist/src/messages/responses/vector/list-vector-indexes.d.ts +0 -71
  39. package/dist/src/messages/responses/vector/list-vector-indexes.js +0 -75
  40. package/dist/src/messages/responses/vector/vector-count-items.d.ts +0 -70
  41. package/dist/src/messages/responses/vector/vector-count-items.js +0 -72
  42. package/dist/src/messages/responses/vector/vector-delete-item-batch.d.ts +0 -62
  43. package/dist/src/messages/responses/vector/vector-delete-item-batch.js +0 -55
  44. package/dist/src/messages/responses/vector/vector-get-item-batch.d.ts +0 -73
  45. package/dist/src/messages/responses/vector/vector-get-item-batch.js +0 -74
  46. package/dist/src/messages/responses/vector/vector-get-item-metadata-batch.d.ts +0 -73
  47. package/dist/src/messages/responses/vector/vector-get-item-metadata-batch.js +0 -74
  48. package/dist/src/messages/responses/vector/vector-search-and-fetch-vectors.d.ts +0 -69
  49. package/dist/src/messages/responses/vector/vector-search-and-fetch-vectors.js +0 -67
  50. package/dist/src/messages/responses/vector/vector-search.d.ts +0 -70
  51. package/dist/src/messages/responses/vector/vector-search.js +0 -67
  52. package/dist/src/messages/responses/vector/vector-upsert-item-batch.d.ts +0 -61
  53. package/dist/src/messages/responses/vector/vector-upsert-item-batch.js +0 -54
  54. package/dist/src/messages/vector-index-filters.d.ts +0 -279
  55. package/dist/src/messages/vector-index-filters.js +0 -325
  56. package/dist/src/messages/vector-index-info.d.ts +0 -15
  57. package/dist/src/messages/vector-index-info.js +0 -38
  58. package/dist/src/messages/vector-index.d.ts +0 -42
  59. package/dist/src/messages/vector-index.js +0 -3
@@ -1,73 +0,0 @@
1
- import { SdkError } from '../../../errors';
2
- import { VectorIndexMetadata } from '../../..';
3
- import { ResponseBase } from '../response-base';
4
- /**
5
- * Parent response type for a VectorGetItemMetadataBatch request. The
6
- * response object is resolved to a type-safe object of one of
7
- * the following subtypes:
8
- *
9
- * - {Success}
10
- * - {Error}
11
- *
12
- * `instanceof` type guards can be used to operate on the appropriate subtype.
13
- * @example
14
- * For example:
15
- * ```
16
- * if (response instanceof VectorGetItemMetadataBatch.Error) {
17
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
18
- * // `VectorGetItemMetadataBatch.Error` in this block, so you will have access to the properties
19
- * // of the Error class; e.g. `response.errorCode()`.
20
- * }
21
- * ```
22
- */
23
- export declare abstract class Response extends ResponseBase {
24
- values(): Record<string, VectorIndexMetadata> | undefined;
25
- }
26
- declare class _Success extends Response {
27
- }
28
- declare const Success_base: {
29
- new (...args: any[]): {
30
- readonly is_success: boolean;
31
- };
32
- } & typeof _Success;
33
- /**
34
- * Indicates a Successful VectorGetItemMetadataBatch request.
35
- */
36
- export declare class Success extends Success_base {
37
- private readonly _values;
38
- constructor(values: Record<string, VectorIndexMetadata>);
39
- /**
40
- * Returns the metadat for the found items from the VectorGetItemMetadataBatch request.
41
- *
42
- * Items that were not found will not be included in the
43
- * returned object.
44
- * @returns {Record<string, VectorIndexMetadata>} The metadata for items found in the index.
45
- */
46
- values(): Record<string, VectorIndexMetadata>;
47
- }
48
- declare class _Error extends Response {
49
- protected _innerException: SdkError;
50
- constructor(_innerException: SdkError);
51
- }
52
- declare const Error_base: {
53
- new (...args: any[]): {
54
- _innerException: SdkError;
55
- message(): string;
56
- innerException(): SdkError;
57
- errorCode(): import("../../..").MomentoErrorCode;
58
- toString(): string;
59
- };
60
- } & typeof _Error;
61
- /**
62
- * Indicates that an error occurred during the VectorGetItemMetadataBatch request.
63
- *
64
- * This response object includes the following fields that you can use to determine
65
- * how you would like to handle the error:
66
- *
67
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
68
- * - `message()` - a human-readable description of the error
69
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
70
- */
71
- export declare class Error extends Error_base {
72
- }
73
- export {};
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Error = exports.Success = exports.Response = void 0;
4
- const response_base_1 = require("../response-base");
5
- /**
6
- * Parent response type for a VectorGetItemMetadataBatch request. The
7
- * response object is resolved to a type-safe object of one of
8
- * the following subtypes:
9
- *
10
- * - {Success}
11
- * - {Error}
12
- *
13
- * `instanceof` type guards can be used to operate on the appropriate subtype.
14
- * @example
15
- * For example:
16
- * ```
17
- * if (response instanceof VectorGetItemMetadataBatch.Error) {
18
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
19
- * // `VectorGetItemMetadataBatch.Error` in this block, so you will have access to the properties
20
- * // of the Error class; e.g. `response.errorCode()`.
21
- * }
22
- * ```
23
- */
24
- class Response extends response_base_1.ResponseBase {
25
- values() {
26
- if (this instanceof Success) {
27
- return this.values();
28
- }
29
- return undefined;
30
- }
31
- }
32
- exports.Response = Response;
33
- class _Success extends Response {
34
- }
35
- /**
36
- * Indicates a Successful VectorGetItemMetadataBatch request.
37
- */
38
- class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
39
- constructor(values) {
40
- super();
41
- this._values = values;
42
- }
43
- /**
44
- * Returns the metadat for the found items from the VectorGetItemMetadataBatch request.
45
- *
46
- * Items that were not found will not be included in the
47
- * returned object.
48
- * @returns {Record<string, VectorIndexMetadata>} The metadata for items found in the index.
49
- */
50
- values() {
51
- return this._values;
52
- }
53
- }
54
- exports.Success = Success;
55
- class _Error extends Response {
56
- constructor(_innerException) {
57
- super();
58
- this._innerException = _innerException;
59
- }
60
- }
61
- /**
62
- * Indicates that an error occurred during the VectorGetItemMetadataBatch request.
63
- *
64
- * This response object includes the following fields that you can use to determine
65
- * how you would like to handle the error:
66
- *
67
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
68
- * - `message()` - a human-readable description of the error
69
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
70
- */
71
- class Error extends (0, response_base_1.ResponseError)(_Error) {
72
- }
73
- exports.Error = Error;
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVjdG9yLWdldC1pdGVtLW1ldGFkYXRhLWJhdGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy92ZWN0b3IvdmVjdG9yLWdldC1pdGVtLW1ldGFkYXRhLWJhdGNoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLG9EQUE4RTtBQUU5RTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBa0JHO0FBQ0gsTUFBc0IsUUFBUyxTQUFRLDRCQUFZO0lBQ2pELE1BQU07UUFDSixJQUFJLElBQUksWUFBWSxPQUFPLEVBQUU7WUFDM0IsT0FBTyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUM7U0FDdEI7UUFDRCxPQUFPLFNBQVMsQ0FBQztJQUNuQixDQUFDO0NBQ0Y7QUFQRCw0QkFPQztBQUVELE1BQU0sUUFBUyxTQUFRLFFBQVE7Q0FBRztBQUVsQzs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLElBQUEsK0JBQWUsRUFBQyxRQUFRLENBQUM7SUFFcEQsWUFBWSxNQUEyQztRQUNyRCxLQUFLLEVBQUUsQ0FBQztRQUNSLElBQUksQ0FBQyxPQUFPLEdBQUcsTUFBTSxDQUFDO0lBQ3hCLENBQUM7SUFDRDs7Ozs7O09BTUc7SUFDSCxNQUFNO1FBQ0osT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDO0lBQ3RCLENBQUM7Q0FDRjtBQWhCRCwwQkFnQkM7QUFFRCxNQUFNLE1BQU8sU0FBUSxRQUFRO0lBQzNCLFlBQXNCLGVBQXlCO1F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YWJsZSBkZXNjcmlwdGlvbiBvZiB0aGUgZXJyb3JcbiAqIC0gYGlubmVyRXhjZXB0aW9uKClgIC0gdGhlIG9yaWdpbmFsIGVycm9yIHRoYXQgY2F1c2VkIHRoZSBmYWlsdXJlOyBjYW4gYmUgcmUtdGhyb3duLlxuICovXG5leHBvcnQgY2xhc3MgRXJyb3IgZXh0ZW5kcyBSZXNwb25zZUVycm9yKF9FcnJvcikge31cbiJdfQ==
@@ -1,69 +0,0 @@
1
- import { SdkError } from '../../../errors';
2
- import { ResponseBase } from '../response-base';
3
- import { SearchHit } from './vector-search';
4
- export interface SearchAndFetchVectorsHit extends SearchHit {
5
- vector: Array<number>;
6
- }
7
- /**
8
- * Parent response type for a VectorSearchAndFetchVectors request. The
9
- * response object is resolved to a type-safe object of one of
10
- * the following subtypes:
11
- *
12
- * - {Success}
13
- * - {Error}
14
- *
15
- * `instanceof` type guards can be used to operate on the appropriate subtype.
16
- * @example
17
- * For example:
18
- * ```
19
- * if (response instanceof VectorSearchAndFetchVectors.Error) {
20
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
21
- * // `VectorSearchAndFetchVectors.Error` in this block, so you will have access to the properties
22
- * // of the Error class; e.g. `response.errorCode()`.
23
- * }
24
- * ```
25
- */
26
- export declare abstract class Response extends ResponseBase {
27
- hits(): Array<SearchAndFetchVectorsHit> | undefined;
28
- }
29
- declare class _Success extends Response {
30
- }
31
- declare const Success_base: {
32
- new (...args: any[]): {
33
- readonly is_success: boolean;
34
- };
35
- } & typeof _Success;
36
- /**
37
- * Indicates a Successful VectorSearchAndFetchVectors request.
38
- */
39
- export declare class Success extends Success_base {
40
- private readonly _hits;
41
- constructor(hits: Array<SearchAndFetchVectorsHit>);
42
- hits(): Array<SearchAndFetchVectorsHit>;
43
- }
44
- declare class _Error extends Response {
45
- protected _innerException: SdkError;
46
- constructor(_innerException: SdkError);
47
- }
48
- declare const Error_base: {
49
- new (...args: any[]): {
50
- _innerException: SdkError;
51
- message(): string;
52
- innerException(): SdkError;
53
- errorCode(): import("../../../errors").MomentoErrorCode;
54
- toString(): string;
55
- };
56
- } & typeof _Error;
57
- /**
58
- * Indicates that an error occurred during the VectorSearchAndFetchVectorsSearch request.
59
- *
60
- * This response object includes the following fields that you can use to determine
61
- * how you would like to handle the error:
62
- *
63
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
64
- * - `message()` - a human-readable description of the error
65
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
66
- */
67
- export declare class Error extends Error_base {
68
- }
69
- export {};
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Error = exports.Success = exports.Response = void 0;
4
- const response_base_1 = require("../response-base");
5
- /**
6
- * Parent response type for a VectorSearchAndFetchVectors request. The
7
- * response object is resolved to a type-safe object of one of
8
- * the following subtypes:
9
- *
10
- * - {Success}
11
- * - {Error}
12
- *
13
- * `instanceof` type guards can be used to operate on the appropriate subtype.
14
- * @example
15
- * For example:
16
- * ```
17
- * if (response instanceof VectorSearchAndFetchVectors.Error) {
18
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
19
- * // `VectorSearchAndFetchVectors.Error` in this block, so you will have access to the properties
20
- * // of the Error class; e.g. `response.errorCode()`.
21
- * }
22
- * ```
23
- */
24
- class Response extends response_base_1.ResponseBase {
25
- hits() {
26
- if (this instanceof Success) {
27
- return this.hits();
28
- }
29
- return undefined;
30
- }
31
- }
32
- exports.Response = Response;
33
- class _Success extends Response {
34
- }
35
- /**
36
- * Indicates a Successful VectorSearchAndFetchVectors request.
37
- */
38
- class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
39
- constructor(hits) {
40
- super();
41
- this._hits = hits;
42
- }
43
- hits() {
44
- return this._hits;
45
- }
46
- }
47
- exports.Success = Success;
48
- class _Error extends Response {
49
- constructor(_innerException) {
50
- super();
51
- this._innerException = _innerException;
52
- }
53
- }
54
- /**
55
- * Indicates that an error occurred during the VectorSearchAndFetchVectorsSearch request.
56
- *
57
- * This response object includes the following fields that you can use to determine
58
- * how you would like to handle the error:
59
- *
60
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
61
- * - `message()` - a human-readable description of the error
62
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
63
- */
64
- class Error extends (0, response_base_1.ResponseError)(_Error) {
65
- }
66
- exports.Error = Error;
67
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVjdG9yLXNlYXJjaC1hbmQtZmV0Y2gtdmVjdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvdmVjdG9yL3ZlY3Rvci1zZWFyY2gtYW5kLWZldGNoLXZlY3RvcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0Esb0RBQThFO0FBTzlFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQkc7QUFDSCxNQUFzQixRQUFTLFNBQVEsNEJBQVk7SUFDakQsSUFBSTtRQUNGLElBQUksSUFBSSxZQUFZLE9BQU8sRUFBRTtZQUMzQixPQUFPLElBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQztTQUNwQjtRQUNELE9BQU8sU0FBUyxDQUFDO0lBQ25CLENBQUM7Q0FDRjtBQVBELDRCQU9DO0FBRUQsTUFBTSxRQUFTLFNBQVEsUUFBUTtDQUFHO0FBRWxDOztHQUVHO0FBQ0gsTUFBYSxPQUFRLFNBQVEsSUFBQSwrQkFBZSxFQUFDLFFBQVEsQ0FBQztJQUVwRCxZQUFZLElBQXFDO1FBQy9DLEtBQUssRUFBRSxDQUFDO1FBQ1IsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUM7SUFDcEIsQ0FBQztJQUNELElBQUk7UUFDRixPQUFPLElBQUksQ0FBQyxLQUFLLENBQUM7SUFDcEIsQ0FBQztDQUNGO0FB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5kcyBSZXNwb25zZUVycm9yKF9FcnJvcikge31cbiJdfQ==
@@ -1,70 +0,0 @@
1
- import { SdkError } from '../../../errors';
2
- import { ResponseBase } from '../response-base';
3
- export interface SearchHit {
4
- id: string;
5
- score: number;
6
- metadata: Record<string, string | number | boolean | Array<string>>;
7
- }
8
- /**
9
- * Parent response type for a VectorSearch request. The
10
- * response object is resolved to a type-safe object of one of
11
- * the following subtypes:
12
- *
13
- * - {Success}
14
- * - {Error}
15
- *
16
- * `instanceof` type guards can be used to operate on the appropriate subtype.
17
- * @example
18
- * For example:
19
- * ```
20
- * if (response instanceof VectorSearch.Error) {
21
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
22
- * // `VectorSearch.Error` in this block, so you will have access to the properties
23
- * // of the Error class; e.g. `response.errorCode()`.
24
- * }
25
- * ```
26
- */
27
- export declare abstract class Response extends ResponseBase {
28
- hits(): Array<SearchHit> | undefined;
29
- }
30
- declare class _Success extends Response {
31
- }
32
- declare const Success_base: {
33
- new (...args: any[]): {
34
- readonly is_success: boolean;
35
- };
36
- } & typeof _Success;
37
- /**
38
- * Indicates a Successful VectorSearch request.
39
- */
40
- export declare class Success extends Success_base {
41
- private readonly _hits;
42
- constructor(hits: Array<SearchHit>);
43
- hits(): Array<SearchHit>;
44
- }
45
- declare class _Error extends Response {
46
- protected _innerException: SdkError;
47
- constructor(_innerException: SdkError);
48
- }
49
- declare const Error_base: {
50
- new (...args: any[]): {
51
- _innerException: SdkError;
52
- message(): string;
53
- innerException(): SdkError;
54
- errorCode(): import("../../../errors").MomentoErrorCode;
55
- toString(): string;
56
- };
57
- } & typeof _Error;
58
- /**
59
- * Indicates that an error occurred during the VectorSearch request.
60
- *
61
- * This response object includes the following fields that you can use to determine
62
- * how you would like to handle the error:
63
- *
64
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
65
- * - `message()` - a human-readable description of the error
66
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
67
- */
68
- export declare class Error extends Error_base {
69
- }
70
- export {};
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Error = exports.Success = exports.Response = void 0;
4
- const response_base_1 = require("../response-base");
5
- /**
6
- * Parent response type for a VectorSearch request. The
7
- * response object is resolved to a type-safe object of one of
8
- * the following subtypes:
9
- *
10
- * - {Success}
11
- * - {Error}
12
- *
13
- * `instanceof` type guards can be used to operate on the appropriate subtype.
14
- * @example
15
- * For example:
16
- * ```
17
- * if (response instanceof VectorSearch.Error) {
18
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
19
- * // `VectorSearch.Error` in this block, so you will have access to the properties
20
- * // of the Error class; e.g. `response.errorCode()`.
21
- * }
22
- * ```
23
- */
24
- class Response extends response_base_1.ResponseBase {
25
- hits() {
26
- if (this instanceof Success) {
27
- return this.hits();
28
- }
29
- return undefined;
30
- }
31
- }
32
- exports.Response = Response;
33
- class _Success extends Response {
34
- }
35
- /**
36
- * Indicates a Successful VectorSearch request.
37
- */
38
- class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
39
- constructor(hits) {
40
- super();
41
- this._hits = hits;
42
- }
43
- hits() {
44
- return this._hits;
45
- }
46
- }
47
- exports.Success = Success;
48
- class _Error extends Response {
49
- constructor(_innerException) {
50
- super();
51
- this._innerException = _innerException;
52
- }
53
- }
54
- /**
55
- * Indicates that an error occurred during the VectorSearch request.
56
- *
57
- * This response object includes the following fields that you can use to determine
58
- * how you would like to handle the error:
59
- *
60
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
61
- * - `message()` - a human-readable description of the error
62
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
63
- */
64
- class Error extends (0, response_base_1.ResponseError)(_Error) {
65
- }
66
- exports.Error = Error;
67
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVjdG9yLXNlYXJjaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy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jYW4gdXNlIHRvIGRldGVybWluZVxuICogaG93IHlvdSB3b3VsZCBsaWtlIHRvIGhhbmRsZSB0aGUgZXJyb3I6XG4gKlxuICogLSBgZXJyb3JDb2RlKClgIC0gYSB1bmlxdWUgTW9tZW50byBlcnJvciBjb2RlIGluZGljYXRpbmcgdGhlIHR5cGUgb2YgZXJyb3IgdGhhdCBvY2N1cnJlZC5cbiAqIC0gYG1lc3NhZ2UoKWAgLSBhIGh1bWFuLXJlYWRhYmxlIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvclxuICogLSBgaW5uZXJFeGNlcHRpb24oKWAgLSB0aGUgb3JpZ2luYWwgZXJyb3IgdGhhdCBjYXVzZWQgdGhlIGZhaWx1cmU7IGNhbiBiZSByZS10aHJvd24uXG4gKi9cbmV4cG9ydCBjbGFzcyBFcnJvciBleHRlbmRzIFJlc3BvbnNlRXJyb3IoX0Vycm9yKSB7fVxuIl19
@@ -1,61 +0,0 @@
1
- import { SdkError } from '../../../errors';
2
- import { ResponseBase } from '../response-base';
3
- /**
4
- * Parent response type for a VectorUpsertItemBatch request. The
5
- * response object is resolved to a type-safe object of one of
6
- * the following subtypes:
7
- *
8
- * - {Success}
9
- * - {Error}
10
- *
11
- * `instanceof` type guards can be used to operate on the appropriate subtype.
12
- * @example
13
- * For example:
14
- * ```
15
- * if (response instanceof VectorUpsertItemBatch.Error) {
16
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
17
- * // `VectorUpsertItemBatch.Error` in this block, so you will have access to the properties
18
- * // of the Error class; e.g. `response.errorCode()`.
19
- * }
20
- * ```
21
- */
22
- export declare abstract class Response extends ResponseBase {
23
- }
24
- declare class _Success extends Response {
25
- }
26
- declare const Success_base: {
27
- new (...args: any[]): {
28
- readonly is_success: boolean;
29
- };
30
- } & typeof _Success;
31
- /**
32
- * Indicates a Successful VectorUpsertItemBatch request.
33
- */
34
- export declare class Success extends Success_base {
35
- }
36
- declare class _Error extends Response {
37
- protected _innerException: SdkError;
38
- constructor(_innerException: SdkError);
39
- }
40
- declare const Error_base: {
41
- new (...args: any[]): {
42
- _innerException: SdkError;
43
- message(): string;
44
- innerException(): SdkError;
45
- errorCode(): import("../../../errors").MomentoErrorCode;
46
- toString(): string;
47
- };
48
- } & typeof _Error;
49
- /**
50
- * Indicates that an error occurred during the VectorUpsertItemBatch request.
51
- *
52
- * This response object includes the following fields that you can use to determine
53
- * how you would like to handle the error:
54
- *
55
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
56
- * - `message()` - a human-readable description of the error
57
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
58
- */
59
- export declare class Error extends Error_base {
60
- }
61
- export {};
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Error = exports.Success = exports.Response = void 0;
4
- const response_base_1 = require("../response-base");
5
- /**
6
- * Parent response type for a VectorUpsertItemBatch request. The
7
- * response object is resolved to a type-safe object of one of
8
- * the following subtypes:
9
- *
10
- * - {Success}
11
- * - {Error}
12
- *
13
- * `instanceof` type guards can be used to operate on the appropriate subtype.
14
- * @example
15
- * For example:
16
- * ```
17
- * if (response instanceof VectorUpsertItemBatch.Error) {
18
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
19
- * // `VectorUpsertItemBatch.Error` in this block, so you will have access to the properties
20
- * // of the Error class; e.g. `response.errorCode()`.
21
- * }
22
- * ```
23
- */
24
- class Response extends response_base_1.ResponseBase {
25
- }
26
- exports.Response = Response;
27
- class _Success extends Response {
28
- }
29
- /**
30
- * Indicates a Successful VectorUpsertItemBatch request.
31
- */
32
- class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
33
- }
34
- exports.Success = Success;
35
- class _Error extends Response {
36
- constructor(_innerException) {
37
- super();
38
- this._innerException = _innerException;
39
- }
40
- }
41
- /**
42
- * Indicates that an error occurred during the VectorUpsertItemBatch request.
43
- *
44
- * This response object includes the following fields that you can use to determine
45
- * how you would like to handle the error:
46
- *
47
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
48
- * - `message()` - a human-readable description of the error
49
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
50
- */
51
- class Error extends (0, response_base_1.ResponseError)(_Error) {
52
- }
53
- exports.Error = Error;
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVjdG9yLXVwc2VydC1pdGVtLWJhdGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy92ZWN0b3IvdmVjdG9yLXVwc2VydC1pdGVtLWJhdGNoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG9EQUE4RTtBQUU5RTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBa0JHO0FBQ0gsTUFBc0IsUUFBUyxTQUFRLDRCQUFZO0NBQUc7QUFBdEQsNEJBQXNEO0FBRXRELE1BQU0sUUFBUyxTQUFRLFFBQVE7Q0FBRztBQUVsQzs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLElBQUEsK0JBQWUsRUFBQyxRQUFRLENBQUM7Q0FBRztBQUF6RCwwQkFBeUQ7QUFFekQsTUFBTSxNQUFPLFNBQVEsUUFBUTtJQUMzQixZQUFzQixlQUF5QjtRQUM3QyxLQUFLLEVBQUUsQ0FBQztRQURZLG9CQUFlLEdBQWYsZUFBZSxDQUFVO0lBRS9DLENBQUM7Q0FDRjtBQUVEOzs7Ozs7Ozs7R0FTRztBQUNILE1BQWEsS0FBTSxTQUFRLElBQUEsNkJBQWEsRUFBQyxNQUFNLENBQUM7Q0FBRztBQUFuRCxzQkFBbUQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1Nka0Vycm9yfSBmcm9tICcuLi8uLi8uLi9lcnJvcnMnO1xuaW1wb3J0IHtSZXNwb25zZUJhc2UsIFJlc3BvbnNlRXJyb3IsIFJlc3Bvb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