@gomomento/sdk-core 1.12.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/auth/credential-provider.d.ts +83 -0
- package/dist/src/auth/credential-provider.js +82 -0
- package/dist/src/auth/index.d.ts +1 -0
- package/dist/src/auth/index.js +18 -0
- package/dist/src/config/logging/default-momento-logger.d.ts +24 -0
- package/dist/src/config/logging/default-momento-logger.js +69 -0
- package/dist/src/config/logging/index.d.ts +3 -0
- package/dist/src/config/logging/index.js +20 -0
- package/dist/src/config/logging/momento-logger.d.ts +10 -0
- package/dist/src/config/logging/momento-logger.js +3 -0
- package/dist/src/config/logging/noop-momento-logger.d.ts +11 -0
- package/dist/src/config/logging/noop-momento-logger.js +34 -0
- package/dist/src/config/transport/grpc-configuration.d.ts +41 -0
- package/dist/src/config/transport/grpc-configuration.js +3 -0
- package/dist/src/config/transport/index.d.ts +2 -0
- package/dist/src/config/transport/index.js +19 -0
- package/dist/src/config/transport/transport-strategy.d.ts +77 -0
- package/dist/src/config/transport/transport-strategy.js +60 -0
- package/dist/src/errors/error-utils.d.ts +2 -0
- package/dist/src/errors/error-utils.js +12 -0
- package/dist/src/errors/errors.d.ts +140 -0
- package/dist/src/errors/errors.js +229 -0
- package/dist/src/errors/index.d.ts +2 -0
- package/dist/src/errors/index.js +19 -0
- package/dist/src/index.d.ts +57 -0
- package/dist/src/index.js +137 -0
- package/dist/src/internal/clients/auth/AbstractAuthClient.d.ts +10 -0
- package/dist/src/internal/clients/auth/AbstractAuthClient.js +13 -0
- package/dist/src/internal/clients/auth/IAuthClient.d.ts +4 -0
- package/dist/src/internal/clients/auth/IAuthClient.js +3 -0
- package/dist/src/internal/clients/auth/index.d.ts +2 -0
- package/dist/src/internal/clients/auth/index.js +19 -0
- package/dist/src/internal/clients/cache/AbstractCacheClient.d.ts +638 -0
- package/dist/src/internal/clients/cache/AbstractCacheClient.js +870 -0
- package/dist/src/internal/clients/cache/ICacheClient.d.ts +45 -0
- package/dist/src/internal/clients/cache/ICacheClient.js +3 -0
- package/dist/src/internal/clients/cache/IControlClient.d.ts +7 -0
- package/dist/src/internal/clients/cache/IControlClient.js +3 -0
- package/dist/src/internal/clients/cache/IDataClient.d.ts +29 -0
- package/dist/src/internal/clients/cache/IDataClient.js +3 -0
- package/dist/src/internal/clients/cache/index.d.ts +4 -0
- package/dist/src/internal/clients/cache/index.js +21 -0
- package/dist/src/internal/clients/index.d.ts +3 -0
- package/dist/src/internal/clients/index.js +20 -0
- package/dist/src/internal/clients/ping/AbstractPingClient.d.ts +25 -0
- package/dist/src/internal/clients/ping/AbstractPingClient.js +29 -0
- package/dist/src/internal/clients/ping/IPingClient.d.ts +3 -0
- package/dist/src/internal/clients/ping/IPingClient.js +3 -0
- package/dist/src/internal/clients/ping/index.d.ts +2 -0
- package/dist/src/internal/clients/ping/index.js +19 -0
- package/dist/src/internal/subscription-state.d.ts +15 -0
- package/dist/src/internal/subscription-state.js +38 -0
- package/dist/src/internal/utils/auth.d.ts +25 -0
- package/dist/src/internal/utils/auth.js +50 -0
- package/dist/src/internal/utils/collections.d.ts +1 -0
- package/dist/src/internal/utils/collections.js +8 -0
- package/dist/src/internal/utils/display.d.ts +2 -0
- package/dist/src/internal/utils/display.js +30 -0
- package/dist/src/internal/utils/index.d.ts +7 -0
- package/dist/src/internal/utils/index.js +24 -0
- package/dist/src/internal/utils/object.d.ts +1 -0
- package/dist/src/internal/utils/object.js +8 -0
- package/dist/src/internal/utils/sleep.d.ts +1 -0
- package/dist/src/internal/utils/sleep.js +6 -0
- package/dist/src/internal/utils/string.d.ts +2 -0
- package/dist/src/internal/utils/string.js +17 -0
- package/dist/src/internal/utils/validators.d.ts +13 -0
- package/dist/src/internal/utils/validators.js +105 -0
- package/dist/src/internal/vendor/printf/README.md +31 -0
- package/dist/src/internal/vendor/printf/printf.d.ts +9 -0
- package/dist/src/internal/vendor/printf/printf.js +478 -0
- package/dist/src/messages/cache-info.d.ts +5 -0
- package/dist/src/messages/cache-info.js +13 -0
- package/dist/src/messages/responses/cache-delete.d.ts +61 -0
- package/dist/src/messages/responses/cache-delete.js +54 -0
- package/dist/src/messages/responses/cache-dictionary-fetch.d.ts +120 -0
- package/dist/src/messages/responses/cache-dictionary-fetch.js +162 -0
- package/dist/src/messages/responses/cache-dictionary-get-field.d.ts +123 -0
- package/dist/src/messages/responses/cache-dictionary-get-field.js +143 -0
- package/dist/src/messages/responses/cache-dictionary-get-fields.d.ts +122 -0
- package/dist/src/messages/responses/cache-dictionary-get-fields.js +173 -0
- package/dist/src/messages/responses/cache-dictionary-increment.d.ts +69 -0
- package/dist/src/messages/responses/cache-dictionary-increment.js +68 -0
- package/dist/src/messages/responses/cache-dictionary-remove-field.d.ts +61 -0
- package/dist/src/messages/responses/cache-dictionary-remove-field.js +54 -0
- package/dist/src/messages/responses/cache-dictionary-remove-fields.d.ts +61 -0
- package/dist/src/messages/responses/cache-dictionary-remove-fields.js +54 -0
- package/dist/src/messages/responses/cache-dictionary-set-field.d.ts +61 -0
- package/dist/src/messages/responses/cache-dictionary-set-field.js +54 -0
- package/dist/src/messages/responses/cache-dictionary-set-fields.d.ts +61 -0
- package/dist/src/messages/responses/cache-dictionary-set-fields.js +54 -0
- package/dist/src/messages/responses/cache-flush.d.ts +61 -0
- package/dist/src/messages/responses/cache-flush.js +54 -0
- package/dist/src/messages/responses/cache-get.d.ts +86 -0
- package/dist/src/messages/responses/cache-get.js +88 -0
- package/dist/src/messages/responses/cache-increment.d.ts +69 -0
- package/dist/src/messages/responses/cache-increment.js +68 -0
- package/dist/src/messages/responses/cache-list-concatenate-back.d.ts +69 -0
- package/dist/src/messages/responses/cache-list-concatenate-back.js +68 -0
- package/dist/src/messages/responses/cache-list-concatenate-front.d.ts +69 -0
- package/dist/src/messages/responses/cache-list-concatenate-front.js +68 -0
- package/dist/src/messages/responses/cache-list-fetch.d.ts +92 -0
- package/dist/src/messages/responses/cache-list-fetch.js +96 -0
- package/dist/src/messages/responses/cache-list-length.d.ts +84 -0
- package/dist/src/messages/responses/cache-list-length.js +78 -0
- package/dist/src/messages/responses/cache-list-pop-back.d.ts +86 -0
- package/dist/src/messages/responses/cache-list-pop-back.js +88 -0
- package/dist/src/messages/responses/cache-list-pop-front.d.ts +86 -0
- package/dist/src/messages/responses/cache-list-pop-front.js +88 -0
- package/dist/src/messages/responses/cache-list-push-back.d.ts +69 -0
- package/dist/src/messages/responses/cache-list-push-back.js +68 -0
- package/dist/src/messages/responses/cache-list-push-front.d.ts +69 -0
- package/dist/src/messages/responses/cache-list-push-front.js +68 -0
- package/dist/src/messages/responses/cache-list-remove-value.d.ts +61 -0
- package/dist/src/messages/responses/cache-list-remove-value.js +54 -0
- package/dist/src/messages/responses/cache-list-retain.d.ts +61 -0
- package/dist/src/messages/responses/cache-list-retain.js +54 -0
- package/dist/src/messages/responses/cache-set-add-element.d.ts +71 -0
- package/dist/src/messages/responses/cache-set-add-element.js +54 -0
- package/dist/src/messages/responses/cache-set-add-elements.d.ts +65 -0
- package/dist/src/messages/responses/cache-set-add-elements.js +61 -0
- package/dist/src/messages/responses/cache-set-fetch.d.ts +111 -0
- package/dist/src/messages/responses/cache-set-fetch.js +121 -0
- package/dist/src/messages/responses/cache-set-if-not-exists.d.ts +74 -0
- package/dist/src/messages/responses/cache-set-if-not-exists.js +63 -0
- package/dist/src/messages/responses/cache-set-remove-element.d.ts +61 -0
- package/dist/src/messages/responses/cache-set-remove-element.js +54 -0
- package/dist/src/messages/responses/cache-set-remove-elements.d.ts +65 -0
- package/dist/src/messages/responses/cache-set-remove-elements.js +61 -0
- package/dist/src/messages/responses/cache-set.d.ts +61 -0
- package/dist/src/messages/responses/cache-set.js +54 -0
- package/dist/src/messages/responses/cache-sorted-set-fetch.d.ts +107 -0
- package/dist/src/messages/responses/cache-sorted-set-fetch.js +124 -0
- package/dist/src/messages/responses/cache-sorted-set-get-rank.d.ts +81 -0
- package/dist/src/messages/responses/cache-sorted-set-get-rank.js +78 -0
- package/dist/src/messages/responses/cache-sorted-set-get-score.d.ts +118 -0
- package/dist/src/messages/responses/cache-sorted-set-get-score.js +131 -0
- package/dist/src/messages/responses/cache-sorted-set-get-scores.d.ts +109 -0
- package/dist/src/messages/responses/cache-sorted-set-get-scores.js +148 -0
- package/dist/src/messages/responses/cache-sorted-set-increment-score.d.ts +69 -0
- package/dist/src/messages/responses/cache-sorted-set-increment-score.js +68 -0
- package/dist/src/messages/responses/cache-sorted-set-put-element.d.ts +61 -0
- package/dist/src/messages/responses/cache-sorted-set-put-element.js +54 -0
- package/dist/src/messages/responses/cache-sorted-set-put-elements.d.ts +61 -0
- package/dist/src/messages/responses/cache-sorted-set-put-elements.js +54 -0
- package/dist/src/messages/responses/cache-sorted-set-remove-element.d.ts +61 -0
- package/dist/src/messages/responses/cache-sorted-set-remove-element.js +54 -0
- package/dist/src/messages/responses/cache-sorted-set-remove-elements.d.ts +61 -0
- package/dist/src/messages/responses/cache-sorted-set-remove-elements.js +54 -0
- package/dist/src/messages/responses/create-cache.d.ts +77 -0
- package/dist/src/messages/responses/create-cache.js +61 -0
- package/dist/src/messages/responses/create-signing-key.d.ts +71 -0
- package/dist/src/messages/responses/create-signing-key.js +76 -0
- package/dist/src/messages/responses/delete-cache.d.ts +61 -0
- package/dist/src/messages/responses/delete-cache.js +54 -0
- package/dist/src/messages/responses/generate-api-token.d.ts +50 -0
- package/dist/src/messages/responses/generate-api-token.js +52 -0
- package/dist/src/messages/responses/grpc-response-types.d.ts +41 -0
- package/dist/src/messages/responses/grpc-response-types.js +53 -0
- package/dist/src/messages/responses/list-caches.d.ts +70 -0
- package/dist/src/messages/responses/list-caches.js +69 -0
- package/dist/src/messages/responses/list-signing-keys.d.ts +68 -0
- package/dist/src/messages/responses/list-signing-keys.js +68 -0
- package/dist/src/messages/responses/response-base.d.ts +43 -0
- package/dist/src/messages/responses/response-base.js +50 -0
- package/dist/src/messages/responses/revoke-signing-key.d.ts +61 -0
- package/dist/src/messages/responses/revoke-signing-key.js +54 -0
- package/dist/src/messages/responses/topic-item.d.ts +27 -0
- package/dist/src/messages/responses/topic-item.js +43 -0
- package/dist/src/messages/responses/topic-publish.d.ts +61 -0
- package/dist/src/messages/responses/topic-publish.js +54 -0
- package/dist/src/messages/responses/topic-subscribe.d.ts +69 -0
- package/dist/src/messages/responses/topic-subscribe.js +72 -0
- package/dist/src/messages/signing-key.d.ts +9 -0
- package/dist/src/messages/signing-key.js +21 -0
- package/dist/src/utils/cache-call-options.d.ts +99 -0
- package/dist/src/utils/cache-call-options.js +9 -0
- package/dist/src/utils/collection-ttl.d.ts +78 -0
- package/dist/src/utils/collection-ttl.js +102 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.js +20 -0
- package/dist/src/utils/topic-call-options.d.ts +19 -0
- package/dist/src/utils/topic-call-options.js +3 -0
- package/package.json +53 -0
@@ -0,0 +1,54 @@
|
|
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 sorted set RemoveElement 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 CacheSortedSetRemoveElement.Error) {
|
18
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
+
* // `CacheSortedSetRemoveElement.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 sorted set put element 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 sorted set put element 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc29ydGVkLXNldC1yZW1vdmUtZWxlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtc29ydGVkLXNldC1yZW1vdmUtZWxlbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxtREFBNkU7QUFFN0U7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCRztBQUNILE1BQXNCLFFBQVMsU0FBUSw0QkFBWTtDQUFHO0FBQXRELDRCQUFzRDtBQUV0RCxNQUFNLFFBQVMsU0FBUSxRQUFRO0NBQUc7QUFFbEM7O0dBRUc7QUFDSCxNQUFhLE9BQVEsU0FBUSxJQUFBLCtCQUFlLEVBQUMsUUFBUSxDQUFDO0NBQUc7QUFBekQsMEJBQXlEO0FBRXpELE1BQU0sTUFBT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RpbmcgdGhlIHR5cGUgb2YgZXJyb3IgdGhhdCBvY2N1cnJlZC5cbiAqIC0gYG1lc3NhZ2UoKWAgLSBhIGh1bWFuLXJlYWRhYmxlIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvclxuICogLSBgaW5uZXJFeGNlcHRpb24oKWAgLSB0aGUgb3JpZ2luYWwgZXJyb3IgdGhhdCBjYXVzZWQgdGhlIGZhaWx1cmU7IGNhbiBiZSByZS10aHJvd24uXG4gKi9cbmV4cG9ydCBjbGFzcyBFcnJvciBleHRlbmRzIFJlc3BvbnNlRXJyb3IoX0Vycm9yKSB7fVxuIl19
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { SdkError } from '../../errors/errors';
|
2
|
+
import { ResponseBase } from './response-base';
|
3
|
+
/**
|
4
|
+
* Parent response type for a sorted set RemoveElements 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 CacheSortedSetRemoveElements.Error) {
|
16
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
+
* // `CacheSortedSetRemoveElements.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 sorted set put element 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/errors").MomentoErrorCode;
|
46
|
+
toString(): string;
|
47
|
+
};
|
48
|
+
} & typeof _Error;
|
49
|
+
/**
|
50
|
+
* Indicates that an error occurred during the sorted set put element 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 {};
|
@@ -0,0 +1,54 @@
|
|
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 sorted set RemoveElements 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 CacheSortedSetRemoveElements.Error) {
|
18
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
+
* // `CacheSortedSetRemoveElements.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 sorted set put element 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 sorted set put element 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc29ydGVkLXNldC1yZW1vdmUtZWxlbWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL2NhY2hlLXNvcnRlZC1zZXQtcmVtb3ZlLWVsZW1lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG1EQUE2RTtBQUU3RTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBa0JHO0FBQ0gsTUFBc0IsUUFBUyxTQUFRLDRCQUFZO0NBQUc7QUFBdEQsNEJBQXNEO0FBRXRELE1BQU0sUUFBUyxTQUFRLFFBQVE7Q0FBRztBQUVsQzs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLElBQUEsK0JBQWUsR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AtIGBlcnJvckNvZGUoKWAgLSBhIHVuaXF1ZSBNb21lbnRvIGVycm9yIGNvZGUgaW5kaWNhdGluZyB0aGUgdHlwZSBvZiBlcnJvciB0aGF0IG9jY3VycmVkLlxuICogLSBgbWVzc2FnZSgpYCAtIGEgaHVtYW4tcmVhZGFibGUgZGVzY3JpcHRpb24gb2YgdGhlIGVycm9yXG4gKiAtIGBpbm5lckV4Y2VwdGlvbigpYCAtIHRoZSBvcmlnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgUmVzcG9uc2VFcnJvcihfRXJyb3IpIHt9XG4iXX0=
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { SdkError } from '../../errors/errors';
|
2
|
+
import { ResponseBase } from './response-base';
|
3
|
+
/**
|
4
|
+
* Parent response type for a create cache request. The
|
5
|
+
* response object is resolved to a type-safe object of one of
|
6
|
+
* the following subtypes:
|
7
|
+
*
|
8
|
+
* - {Success}
|
9
|
+
* - {AlreadyExists}
|
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 CreateCache.Error) {
|
17
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
18
|
+
* // `CreateCache.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
|
+
}
|
25
|
+
declare class _Success extends Response {
|
26
|
+
}
|
27
|
+
declare const Success_base: {
|
28
|
+
new (...args: any[]): {
|
29
|
+
readonly is_success: boolean;
|
30
|
+
};
|
31
|
+
} & typeof _Success;
|
32
|
+
/**
|
33
|
+
* Indicates a Successful create cache request.
|
34
|
+
*/
|
35
|
+
export declare class Success extends Success_base {
|
36
|
+
}
|
37
|
+
declare class _Error extends Response {
|
38
|
+
protected _innerException: SdkError;
|
39
|
+
constructor(_innerException: SdkError);
|
40
|
+
}
|
41
|
+
declare const Error_base: {
|
42
|
+
new (...args: any[]): {
|
43
|
+
_innerException: SdkError;
|
44
|
+
message(): string;
|
45
|
+
/**
|
46
|
+
* Indicates that an error occurred during the create cache request.
|
47
|
+
*
|
48
|
+
* This response object includes the following fields that you can use to determine
|
49
|
+
* how you would like to handle the error:
|
50
|
+
*
|
51
|
+
* - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
|
52
|
+
* - `message()` - a human-readable description of the error
|
53
|
+
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
54
|
+
*/
|
55
|
+
innerException(): SdkError;
|
56
|
+
errorCode(): import("../../errors/errors").MomentoErrorCode;
|
57
|
+
toString(): string;
|
58
|
+
};
|
59
|
+
} & typeof _Error;
|
60
|
+
/**
|
61
|
+
* Indicates that an error occurred during the create cache request.
|
62
|
+
*
|
63
|
+
* This response object includes the following fields that you can use to determine
|
64
|
+
* how you would like to handle the error:
|
65
|
+
*
|
66
|
+
* - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
|
67
|
+
* - `message()` - a human-readable description of the error
|
68
|
+
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
69
|
+
*/
|
70
|
+
export declare class Error extends Error_base {
|
71
|
+
}
|
72
|
+
/**
|
73
|
+
* Indicates that the cache already exists, so there was nothing to do.
|
74
|
+
*/
|
75
|
+
export declare class AlreadyExists extends Response {
|
76
|
+
}
|
77
|
+
export {};
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AlreadyExists = exports.Error = exports.Success = exports.Response = void 0;
|
4
|
+
const response_base_1 = require("./response-base");
|
5
|
+
/**
|
6
|
+
* Parent response type for a create cache request. The
|
7
|
+
* response object is resolved to a type-safe object of one of
|
8
|
+
* the following subtypes:
|
9
|
+
*
|
10
|
+
* - {Success}
|
11
|
+
* - {AlreadyExists}
|
12
|
+
* - {Error}
|
13
|
+
*
|
14
|
+
* `instanceof` type guards can be used to operate on the appropriate subtype.
|
15
|
+
* @example
|
16
|
+
* For example:
|
17
|
+
* ```
|
18
|
+
* if (response instanceof CreateCache.Error) {
|
19
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
20
|
+
* // `CreateCache.Error` in this block, so you will have access to the properties
|
21
|
+
* // of the Error class; e.g. `response.errorCode()`.
|
22
|
+
* }
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
class Response extends response_base_1.ResponseBase {
|
26
|
+
}
|
27
|
+
exports.Response = Response;
|
28
|
+
class _Success extends Response {
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* Indicates a Successful create cache request.
|
32
|
+
*/
|
33
|
+
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
34
|
+
}
|
35
|
+
exports.Success = Success;
|
36
|
+
class _Error extends Response {
|
37
|
+
constructor(_innerException) {
|
38
|
+
super();
|
39
|
+
this._innerException = _innerException;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* Indicates that an error occurred during the create cache request.
|
44
|
+
*
|
45
|
+
* This response object includes the following fields that you can use to determine
|
46
|
+
* how you would like to handle the error:
|
47
|
+
*
|
48
|
+
* - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
|
49
|
+
* - `message()` - a human-readable description of the error
|
50
|
+
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
51
|
+
*/
|
52
|
+
class Error extends (0, response_base_1.ResponseError)(_Error) {
|
53
|
+
}
|
54
|
+
exports.Error = Error;
|
55
|
+
/**
|
56
|
+
* Indicates that the cache already exists, so there was nothing to do.
|
57
|
+
*/
|
58
|
+
class AlreadyExists extends Response {
|
59
|
+
}
|
60
|
+
exports.AlreadyExists = AlreadyExists;
|
61
|
+
//# sour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
|
1
|
+
import { SdkError } from '../../errors/errors';
|
2
|
+
import { _SigningKey } from './grpc-response-types';
|
3
|
+
import { ResponseBase } from './response-base';
|
4
|
+
/**
|
5
|
+
* Parent response type for a create signing key 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 CreateSigningKey.Error) {
|
17
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
18
|
+
* // `CreateSigningKey.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
|
+
}
|
25
|
+
declare class _Success extends Response {
|
26
|
+
private readonly keyId;
|
27
|
+
private readonly endpoint;
|
28
|
+
private readonly key;
|
29
|
+
private readonly expiresAt;
|
30
|
+
constructor(endpoint: string, result?: _SigningKey);
|
31
|
+
getKeyId(): string;
|
32
|
+
getEndpoint(): string;
|
33
|
+
getKey(): string;
|
34
|
+
getExpiresAt(): Date;
|
35
|
+
}
|
36
|
+
declare const Success_base: {
|
37
|
+
new (...args: any[]): {
|
38
|
+
readonly is_success: boolean;
|
39
|
+
};
|
40
|
+
} & typeof _Success;
|
41
|
+
/**
|
42
|
+
* Indicates a Successful create signing key request.
|
43
|
+
*/
|
44
|
+
export declare class Success extends Success_base {
|
45
|
+
}
|
46
|
+
declare class _Error extends Response {
|
47
|
+
protected _innerException: SdkError;
|
48
|
+
constructor(_innerException: SdkError);
|
49
|
+
}
|
50
|
+
declare const Error_base: {
|
51
|
+
new (...args: any[]): {
|
52
|
+
_innerException: SdkError;
|
53
|
+
message(): string;
|
54
|
+
innerException(): SdkError;
|
55
|
+
errorCode(): import("../../errors/errors").MomentoErrorCode;
|
56
|
+
toString(): string;
|
57
|
+
};
|
58
|
+
} & typeof _Error;
|
59
|
+
/**
|
60
|
+
* Indicates that an error occurred during the create signing key request.
|
61
|
+
*
|
62
|
+
* This response object includes the following fields that you can use to determine
|
63
|
+
* how you would like to handle the error:
|
64
|
+
*
|
65
|
+
* - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
|
66
|
+
* - `message()` - a human-readable description of the error
|
67
|
+
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
68
|
+
*/
|
69
|
+
export declare class Error extends Error_base {
|
70
|
+
}
|
71
|
+
export {};
|
@@ -0,0 +1,76 @@
|
|
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 create signing key 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 CreateSigningKey.Error) {
|
18
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
+
* // `CreateSigningKey.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
|
+
constructor(endpoint, result) {
|
29
|
+
var _a, _b;
|
30
|
+
super();
|
31
|
+
const key = (_a = result === null || result === void 0 ? void 0 : result.key) !== null && _a !== void 0 ? _a : '';
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
33
|
+
this.keyId = JSON.parse(key)['kid'];
|
34
|
+
this.endpoint = endpoint;
|
35
|
+
this.key = key;
|
36
|
+
this.expiresAt = new Date((_b = result === null || result === void 0 ? void 0 : result.expiresAt) !== null && _b !== void 0 ? _b : 0 * 1000);
|
37
|
+
}
|
38
|
+
getKeyId() {
|
39
|
+
return this.keyId;
|
40
|
+
}
|
41
|
+
getEndpoint() {
|
42
|
+
return this.endpoint;
|
43
|
+
}
|
44
|
+
getKey() {
|
45
|
+
return this.key;
|
46
|
+
}
|
47
|
+
getExpiresAt() {
|
48
|
+
return this.expiresAt;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Indicates a Successful create signing key request.
|
53
|
+
*/
|
54
|
+
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
55
|
+
}
|
56
|
+
exports.Success = Success;
|
57
|
+
class _Error extends Response {
|
58
|
+
constructor(_innerException) {
|
59
|
+
super();
|
60
|
+
this._innerException = _innerException;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* Indicates that an error occurred during the create signing key request.
|
65
|
+
*
|
66
|
+
* This response object includes the following fields that you can use to determine
|
67
|
+
* how you would like to handle the error:
|
68
|
+
*
|
69
|
+
* - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
|
70
|
+
* - `message()` - a human-readable description of the error
|
71
|
+
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
72
|
+
*/
|
73
|
+
class Error extends (0, response_base_1.ResponseError)(_Error) {
|
74
|
+
}
|
75
|
+
exports.Error = Error;
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXNpZ25pbmcta2V5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jcmVhdGUtc2lnbmluZy1r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vIGhhbmRsZSB0aGUgZXJyb3I6XG4gKlxuICogLSBgZXJyb3JDb2RlKClgIC0gYSB1bmlxdWUgTW9tZW50byBlcnJvciBjb2RlIGluZGljYXRpbmcgdGhlIHR5cGUgb2YgZXJyb3IgdGhhdCBvY2N1cnJlZC5cbiAqIC0gYG1lc3NhZ2UoKWAgLSBhIGh1bWFuLXJlYWRhYmxlIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvclxuICogLSBgaW5uZXJFeGNlcHRpb24oKWAgLSB0aGUgb3JpZ2luYWwgZXJyb3IgdGhhdCBjYXVzZWQgdGhlIGZhaWx1cmU7IGNhbiBiZSByZS10aHJvd24uXG4gKi9cbmV4cG9ydCBjbGFzcyBFcnJvciBleHRlbmRzIFJlc3BvbnNlRXJyb3IoX0Vycm9yKSB7fVxuIl19
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { SdkError } from '../../errors/errors';
|
2
|
+
import { ResponseBase } from './response-base';
|
3
|
+
/**
|
4
|
+
* Parent response type for a delete cache 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 DeleteCache.Error) {
|
16
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
+
* // `DeleteCache.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 delete cache 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/errors").MomentoErrorCode;
|
46
|
+
toString(): string;
|
47
|
+
};
|
48
|
+
} & typeof _Error;
|
49
|
+
/**
|
50
|
+
* Indicates that an error occurred during the delete cache 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 {};
|
@@ -0,0 +1,54 @@
|
|
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 delete cache 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 DeleteCache.Error) {
|
18
|
+
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
+
* // `DeleteCache.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 delete cache 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 delete cache 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZXRlLWNhY2hlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9kZWxldGUtY2FjaGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBQTZFO0FBRTdFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQkc7QUFDSCxNQUFzQixRQUFTLFNBQVEsNEJBQVk7Q0FBRztBQUF0RCw0QkFBc0Q7QUFFdEQsTUFBTSxRQUFTLFNBQVEsUUFBUTtDQUFHO0FBRWxDOztHQUVHO0FBQ0gsTUFBYSxPQUFRLFNBQVEsSUFBQSwrQkFBZSx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ZXJyb3IgdGhhdCBvY2N1cnJlZC5cbiAqIC0gYG1lc3NhZ2UoKWAgLSBhIGh1bWFuLXJlYWRhYmxlIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvclxuICogLSBgaW5uZXJFeGNlcHRpb24oKWAgLSB0aGUgb3JpZ2luYWwgZXJyb3IgdGhhdCBjYXVzZWQgdGhlIGZhaWx1cmU7IGNhbiBiZSByZS10aHJvd24uXG4gKi9cbmV4cG9ydCBjbGFzcyBFcnJvciBleHRlbmRzIFJlc3BvbnNlRXJyb3IoX0Vycm9yKSB7fVxuIl19
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { ResponseBase } from './response-base';
|
2
|
+
import { SdkError } from '../../errors';
|
3
|
+
export declare abstract class Response extends ResponseBase {
|
4
|
+
}
|
5
|
+
declare class _Success extends Response {
|
6
|
+
readonly apiToken: string;
|
7
|
+
readonly refreshToken: string;
|
8
|
+
readonly endpoint: string;
|
9
|
+
readonly validUntil: number;
|
10
|
+
constructor(apiToken: string, refreshToken: string, endpoint: string, validUntil: number);
|
11
|
+
getApiToken(): string;
|
12
|
+
getRefreshToken(): string;
|
13
|
+
getValidUntil(): number;
|
14
|
+
}
|
15
|
+
declare const Success_base: {
|
16
|
+
new (...args: any[]): {
|
17
|
+
readonly is_success: boolean;
|
18
|
+
};
|
19
|
+
} & typeof _Success;
|
20
|
+
/**
|
21
|
+
* Indicates a Successful generate api token request.
|
22
|
+
*/
|
23
|
+
export declare class Success extends Success_base {
|
24
|
+
}
|
25
|
+
declare class _Error extends Response {
|
26
|
+
protected _innerException: SdkError;
|
27
|
+
constructor(_innerException: SdkError);
|
28
|
+
}
|
29
|
+
declare const Error_base: {
|
30
|
+
new (...args: any[]): {
|
31
|
+
_innerException: SdkError;
|
32
|
+
message(): string;
|
33
|
+
innerException(): SdkError;
|
34
|
+
errorCode(): import("../../errors").MomentoErrorCode;
|
35
|
+
toString(): string;
|
36
|
+
};
|
37
|
+
} & typeof _Error;
|
38
|
+
/**
|
39
|
+
* Indicates that an error occurred during the generate api token request.
|
40
|
+
*
|
41
|
+
* This response object includes the following fields that you can use to determine
|
42
|
+
* how you would like to handle the error:
|
43
|
+
*
|
44
|
+
* - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
|
45
|
+
* - `message()` - a human-readable description of the error
|
46
|
+
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
47
|
+
*/
|
48
|
+
export declare class Error extends Error_base {
|
49
|
+
}
|
50
|
+
export {};
|