@gomomento/sdk-core 1.87.0 → 1.89.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.
- package/dist/src/clients/ICacheClient.d.ts +2 -2
- package/dist/src/clients/ICacheClient.js +1 -1
- package/dist/src/clients/IMomentoCache.d.ts +2 -2
- package/dist/src/clients/IMomentoCache.js +1 -1
- package/dist/src/errors/errors.js +1 -1
- package/dist/src/internal/clients/cache/IDataClient.d.ts +2 -2
- package/dist/src/internal/clients/cache/IDataClient.js +1 -1
- package/dist/src/messages/responses/cache-batch-get.d.ts +18 -51
- package/dist/src/messages/responses/cache-batch-get.js +23 -56
- package/dist/src/messages/responses/cache-batch-set.d.ts +14 -48
- package/dist/src/messages/responses/cache-batch-set.js +12 -42
- package/dist/src/messages/responses/cache-delete.d.ts +11 -44
- package/dist/src/messages/responses/cache-delete.js +14 -35
- package/dist/src/messages/responses/cache-dictionary-fetch.d.ts +5 -5
- package/dist/src/messages/responses/cache-dictionary-fetch.js +4 -4
- package/dist/src/messages/responses/cache-dictionary-get-field.d.ts +5 -5
- package/dist/src/messages/responses/cache-dictionary-get-field.js +4 -4
- package/dist/src/messages/responses/cache-dictionary-get-fields.d.ts +5 -5
- package/dist/src/messages/responses/cache-dictionary-get-fields.js +4 -4
- package/dist/src/messages/responses/cache-dictionary-increment.d.ts +14 -46
- package/dist/src/messages/responses/cache-dictionary-increment.js +14 -41
- package/dist/src/messages/responses/cache-dictionary-length.d.ts +19 -53
- package/dist/src/messages/responses/cache-dictionary-length.js +26 -40
- package/dist/src/messages/responses/cache-dictionary-remove-field.d.ts +10 -43
- package/dist/src/messages/responses/cache-dictionary-remove-field.js +13 -34
- package/dist/src/messages/responses/cache-dictionary-remove-fields.d.ts +10 -43
- package/dist/src/messages/responses/cache-dictionary-remove-fields.js +13 -34
- package/dist/src/messages/responses/cache-dictionary-set-field.d.ts +10 -43
- package/dist/src/messages/responses/cache-dictionary-set-field.js +13 -34
- package/dist/src/messages/responses/cache-dictionary-set-fields.d.ts +10 -43
- package/dist/src/messages/responses/cache-dictionary-set-fields.js +13 -34
- package/dist/src/messages/responses/cache-flush.d.ts +12 -45
- package/dist/src/messages/responses/cache-flush.js +15 -36
- package/dist/src/messages/responses/cache-get.d.ts +1 -1
- package/dist/src/messages/responses/cache-get.js +1 -1
- package/dist/src/messages/responses/cache-increment.d.ts +24 -51
- package/dist/src/messages/responses/cache-increment.js +27 -49
- package/dist/src/messages/responses/cache-item-get-ttl.d.ts +22 -55
- package/dist/src/messages/responses/cache-item-get-ttl.js +27 -41
- package/dist/src/messages/responses/cache-item-get-type.d.ts +22 -55
- package/dist/src/messages/responses/cache-item-get-type.js +27 -41
- package/dist/src/messages/responses/cache-key-exists.d.ts +16 -47
- package/dist/src/messages/responses/cache-key-exists.js +17 -38
- package/dist/src/messages/responses/cache-keys-exist.d.ts +16 -47
- package/dist/src/messages/responses/cache-keys-exist.js +16 -37
- package/dist/src/messages/responses/cache-list-concatenate-back.d.ts +13 -56
- package/dist/src/messages/responses/cache-list-concatenate-back.js +13 -37
- package/dist/src/messages/responses/cache-list-concatenate-front.d.ts +13 -46
- package/dist/src/messages/responses/cache-list-concatenate-front.js +13 -37
- package/dist/src/messages/responses/cache-list-fetch.d.ts +23 -58
- package/dist/src/messages/responses/cache-list-fetch.js +26 -49
- package/dist/src/messages/responses/cache-list-length.d.ts +27 -66
- package/dist/src/messages/responses/cache-list-length.js +32 -42
- package/dist/src/messages/responses/cache-list-pop-back.d.ts +22 -57
- package/dist/src/messages/responses/cache-list-pop-back.js +25 -48
- package/dist/src/messages/responses/cache-list-pop-front.d.ts +22 -57
- package/dist/src/messages/responses/cache-list-pop-front.js +25 -48
- package/dist/src/messages/responses/cache-list-push-back.d.ts +13 -46
- package/dist/src/messages/responses/cache-list-push-back.js +13 -37
- package/dist/src/messages/responses/cache-list-push-front.d.ts +13 -46
- package/dist/src/messages/responses/cache-list-push-front.js +13 -37
- package/dist/src/messages/responses/cache-list-remove-value.d.ts +11 -44
- package/dist/src/messages/responses/cache-list-remove-value.js +14 -35
- package/dist/src/messages/responses/cache-list-retain.d.ts +11 -44
- package/dist/src/messages/responses/cache-list-retain.js +14 -35
- package/dist/src/messages/responses/cache-set-add-element.d.ts +10 -43
- package/dist/src/messages/responses/cache-set-add-element.js +13 -34
- package/dist/src/messages/responses/cache-set-add-elements.d.ts +12 -45
- package/dist/src/messages/responses/cache-set-add-elements.js +17 -38
- package/dist/src/messages/responses/cache-set-fetch.d.ts +18 -54
- package/dist/src/messages/responses/cache-set-fetch.js +23 -46
- package/dist/src/messages/responses/cache-set-if-absent-or-equal.d.ts +15 -55
- package/dist/src/messages/responses/cache-set-if-absent-or-equal.js +21 -41
- package/dist/src/messages/responses/cache-set-if-absent.d.ts +14 -54
- package/dist/src/messages/responses/cache-set-if-absent.js +20 -40
- package/dist/src/messages/responses/cache-set-if-equal.d.ts +15 -55
- package/dist/src/messages/responses/cache-set-if-equal.js +21 -41
- package/dist/src/messages/responses/cache-set-if-not-equal.d.ts +15 -55
- package/dist/src/messages/responses/cache-set-if-not-equal.js +21 -41
- package/dist/src/messages/responses/cache-set-if-not-exists.d.ts +14 -54
- package/dist/src/messages/responses/cache-set-if-not-exists.js +20 -40
- package/dist/src/messages/responses/cache-set-if-present-and-not-equal.d.ts +15 -55
- package/dist/src/messages/responses/cache-set-if-present-and-not-equal.js +21 -41
- package/dist/src/messages/responses/cache-set-if-present.d.ts +15 -55
- package/dist/src/messages/responses/cache-set-if-present.js +21 -41
- package/dist/src/messages/responses/cache-set-remove-element.d.ts +10 -43
- package/dist/src/messages/responses/cache-set-remove-element.js +13 -34
- package/dist/src/messages/responses/cache-set-remove-elements.d.ts +13 -46
- package/dist/src/messages/responses/cache-set-remove-elements.js +13 -34
- package/dist/src/messages/responses/cache-set-sample.d.ts +18 -54
- package/dist/src/messages/responses/cache-set-sample.js +23 -46
- package/dist/src/messages/responses/cache-set.d.ts +4 -4
- package/dist/src/messages/responses/cache-set.js +3 -3
- package/dist/src/messages/responses/cache-sorted-set-fetch.d.ts +19 -55
- package/dist/src/messages/responses/cache-sorted-set-fetch.js +23 -46
- package/dist/src/messages/responses/cache-sorted-set-get-rank.d.ts +19 -53
- package/dist/src/messages/responses/cache-sorted-set-get-rank.js +22 -39
- package/dist/src/messages/responses/cache-sorted-set-get-score.d.ts +28 -66
- package/dist/src/messages/responses/cache-sorted-set-get-score.js +32 -60
- package/dist/src/messages/responses/cache-sorted-set-get-scores.d.ts +21 -58
- package/dist/src/messages/responses/cache-sorted-set-get-scores.js +29 -52
- package/dist/src/messages/responses/cache-sorted-set-increment-score.d.ts +14 -46
- package/dist/src/messages/responses/cache-sorted-set-increment-score.js +14 -41
- package/dist/src/messages/responses/cache-sorted-set-length-by-score.d.ts +18 -53
- package/dist/src/messages/responses/cache-sorted-set-length-by-score.js +23 -40
- package/dist/src/messages/responses/cache-sorted-set-length.d.ts +19 -53
- package/dist/src/messages/responses/cache-sorted-set-length.js +22 -39
- package/dist/src/messages/responses/cache-sorted-set-put-element.d.ts +10 -43
- package/dist/src/messages/responses/cache-sorted-set-put-element.js +13 -34
- package/dist/src/messages/responses/cache-sorted-set-put-elements.d.ts +10 -43
- package/dist/src/messages/responses/cache-sorted-set-put-elements.js +13 -34
- package/dist/src/messages/responses/cache-sorted-set-remove-element.d.ts +10 -43
- package/dist/src/messages/responses/cache-sorted-set-remove-element.js +13 -34
- package/dist/src/messages/responses/cache-sorted-set-remove-elements.d.ts +10 -43
- package/dist/src/messages/responses/cache-sorted-set-remove-elements.js +13 -34
- package/dist/src/messages/responses/cache-ttl-decrease.d.ts +19 -53
- package/dist/src/messages/responses/cache-ttl-decrease.js +29 -39
- package/dist/src/messages/responses/cache-ttl-increase.d.ts +19 -53
- package/dist/src/messages/responses/cache-ttl-increase.js +29 -39
- package/dist/src/messages/responses/cache-ttl-update.d.ts +15 -55
- package/dist/src/messages/responses/cache-ttl-update.js +21 -41
- package/dist/src/messages/responses/create-cache.d.ts +15 -48
- package/dist/src/messages/responses/create-cache.js +21 -39
- package/dist/src/messages/responses/delete-cache.d.ts +11 -44
- package/dist/src/messages/responses/delete-cache.js +14 -35
- package/dist/src/messages/responses/enums/auth/generate-api-key.d.ts +4 -0
- package/dist/src/messages/responses/enums/auth/generate-api-key.js +9 -0
- package/dist/src/messages/responses/enums/auth/generate-disposable-token.d.ts +4 -0
- package/dist/src/messages/responses/enums/auth/generate-disposable-token.js +9 -0
- package/dist/src/messages/responses/enums/auth/index.d.ts +3 -0
- package/dist/src/messages/responses/enums/auth/index.js +10 -0
- package/dist/src/messages/responses/enums/auth/refresh-api-key.d.ts +4 -0
- package/dist/src/messages/responses/enums/auth/refresh-api-key.js +9 -0
- package/dist/src/messages/responses/enums/cache/control/index.d.ts +17 -0
- package/dist/src/messages/responses/enums/cache/control/index.js +25 -0
- package/dist/src/messages/responses/enums/cache/dictionary/index.d.ts +40 -0
- package/dist/src/messages/responses/enums/cache/dictionary/index.js +53 -0
- package/dist/src/messages/responses/enums/cache/index.d.ts +6 -0
- package/dist/src/messages/responses/enums/cache/index.js +23 -0
- package/dist/src/messages/responses/enums/cache/list/index.d.ts +44 -0
- package/dist/src/messages/responses/enums/cache/list/index.js +58 -0
- package/dist/src/messages/responses/enums/cache/scalar/index.d.ts +95 -0
- package/dist/src/messages/responses/enums/cache/scalar/index.js +122 -0
- package/dist/src/messages/responses/enums/cache/set/index.d.ts +26 -0
- package/dist/src/messages/responses/enums/cache/set/index.js +36 -0
- package/dist/src/messages/responses/enums/cache/sorted-set/index.d.ts +50 -0
- package/dist/src/messages/responses/enums/cache/sorted-set/index.js +65 -0
- package/dist/src/messages/responses/enums/index.d.ts +4 -24
- package/dist/src/messages/responses/enums/index.js +19 -31
- package/dist/src/messages/responses/enums/leaderboard/index.d.ts +20 -0
- package/dist/src/messages/responses/enums/leaderboard/index.js +29 -0
- package/dist/src/messages/responses/enums/topics/index.d.ts +8 -0
- package/dist/src/messages/responses/enums/topics/index.js +14 -0
- package/dist/src/messages/responses/generate-api-key.d.ts +10 -27
- package/dist/src/messages/responses/generate-api-key.js +10 -18
- package/dist/src/messages/responses/generate-disposable-token.d.ts +10 -27
- package/dist/src/messages/responses/generate-disposable-token.js +10 -18
- package/dist/src/messages/responses/leaderboard/leaderboard-delete.d.ts +10 -43
- package/dist/src/messages/responses/leaderboard/leaderboard-delete.js +13 -34
- package/dist/src/messages/responses/leaderboard/leaderboard-fetch.d.ts +12 -45
- package/dist/src/messages/responses/leaderboard/leaderboard-fetch.js +11 -35
- package/dist/src/messages/responses/leaderboard/leaderboard-length.d.ts +12 -45
- package/dist/src/messages/responses/leaderboard/leaderboard-length.js +11 -35
- package/dist/src/messages/responses/leaderboard/leaderboard-remove-elements.d.ts +10 -43
- package/dist/src/messages/responses/leaderboard/leaderboard-remove-elements.js +13 -34
- package/dist/src/messages/responses/leaderboard/leaderboard-upsert.d.ts +11 -44
- package/dist/src/messages/responses/leaderboard/leaderboard-upsert.js +14 -35
- package/dist/src/messages/responses/list-caches.d.ts +13 -46
- package/dist/src/messages/responses/list-caches.js +11 -35
- package/dist/src/messages/responses/refresh-api-key.d.ts +10 -27
- package/dist/src/messages/responses/refresh-api-key.js +10 -18
- package/dist/src/messages/responses/response-base.d.ts +6 -0
- package/dist/src/messages/responses/response-base.js +9 -2
- package/dist/src/messages/responses/topic-publish.d.ts +10 -43
- package/dist/src/messages/responses/topic-publish.js +13 -34
- package/dist/src/messages/responses/topic-subscribe.d.ts +10 -37
- package/dist/src/messages/responses/topic-subscribe.js +10 -33
- package/dist/src/messages/responses/webhook/list-webhooks.d.ts +1 -10
- package/package.json +1 -1
@@ -1,43 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Error = exports.Success =
|
3
|
+
exports.Error = exports.Success = void 0;
|
4
4
|
const response_base_1 = require("./response-base");
|
5
|
-
|
6
|
-
* Parent response type for a set remove element 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 CacheSetRemoveElement.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheSetRemoveElement.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
|
-
}
|
5
|
+
const enums_1 = require("./enums");
|
29
6
|
/**
|
30
7
|
* Indicates a Successful set remove element request.
|
31
8
|
*/
|
32
|
-
class Success extends
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
constructor(_innerException) {
|
37
|
-
super();
|
38
|
-
this._innerException = _innerException;
|
9
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.type = enums_1.CacheSetRemoveElementResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the set remove element request.
|
43
18
|
*
|
@@ -48,7 +23,11 @@ class _Error extends Response {
|
|
48
23
|
* - `message()` - a human-readable description of the error
|
49
24
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
50
25
|
*/
|
51
|
-
class Error extends
|
26
|
+
class Error extends response_base_1.BaseResponseError {
|
27
|
+
constructor(_innerException) {
|
28
|
+
super(_innerException);
|
29
|
+
this.type = enums_1.CacheSetRemoveElementResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+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aGVTZXRSZW1vdmVFbGVtZW50UmVzcG9uc2UuRXJyb3I7XG4gIGNvbnN0cnVjdG9yKF9pbm5lckV4Y2VwdGlvbjogU2RrRXJyb3IpIHtcbiAgICBzdXBlcihfaW5uZXJFeGNlcHRpb24pO1xuICB9XG59XG5cbmV4cG9ydCB0eXBlIFJlc3BvbnNlID0gU3VjY2VzcyB8IEVycm9yO1xuIl19
|
@@ -1,54 +1,18 @@
|
|
1
1
|
import * as CacheSetRemoveElement from './cache-set-remove-element';
|
2
|
-
import {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
3
|
import { SdkError } from '../../errors';
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
constructor(_innerException: SdkError);
|
9
|
-
}
|
10
|
-
/**
|
11
|
-
* Parent response type for a set remove elements request. The
|
12
|
-
* response object is resolved to a type-safe object of one of
|
13
|
-
* the following subtypes:
|
14
|
-
*
|
15
|
-
* - {Success}
|
16
|
-
* - {Error}
|
17
|
-
*
|
18
|
-
* `instanceof` type guards can be used to operate on the appropriate subtype.
|
19
|
-
* @example
|
20
|
-
* For example:
|
21
|
-
* ```
|
22
|
-
* if (response instanceof CacheSetRemoveElements.Error) {
|
23
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
24
|
-
* // `CacheSetRemoveElements.Error` in this block, so you will have access to the properties
|
25
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
26
|
-
* }
|
27
|
-
* ```
|
28
|
-
*/
|
29
|
-
export declare abstract class Response extends ResponseBase {
|
30
|
-
abstract toSingularResponse(): CacheSetRemoveElement.Response;
|
4
|
+
import { CacheSetRemoveElementsResponse } from './enums';
|
5
|
+
interface IResponse {
|
6
|
+
readonly type: CacheSetRemoveElementsResponse;
|
7
|
+
toSingularResponse(): CacheSetRemoveElement.Response;
|
31
8
|
}
|
32
|
-
declare const Success_base: {
|
33
|
-
new (...args: any[]): {
|
34
|
-
readonly is_success: boolean;
|
35
|
-
};
|
36
|
-
} & typeof _Success;
|
37
9
|
/**
|
38
10
|
* Indicates a Successful set remove elements request.
|
39
11
|
*/
|
40
|
-
export declare class Success extends
|
41
|
-
|
12
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
13
|
+
readonly type: CacheSetRemoveElementsResponse.Success;
|
14
|
+
toSingularResponse(): CacheSetRemoveElement.Success;
|
42
15
|
}
|
43
|
-
declare const Error_base: {
|
44
|
-
new (...args: any[]): {
|
45
|
-
_innerException: SdkError;
|
46
|
-
message(): string;
|
47
|
-
innerException(): SdkError;
|
48
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
49
|
-
toString(): string;
|
50
|
-
};
|
51
|
-
} & typeof _Error;
|
52
16
|
/**
|
53
17
|
* Indicates that an error occurred during the set remove elements request.
|
54
18
|
*
|
@@ -59,7 +23,10 @@ declare const Error_base: {
|
|
59
23
|
* - `message()` - a human-readable description of the error
|
60
24
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
61
25
|
*/
|
62
|
-
export declare class Error extends
|
63
|
-
|
26
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
27
|
+
readonly type: CacheSetRemoveElementsResponse.Error;
|
28
|
+
constructor(_innerException: SdkError);
|
29
|
+
toSingularResponse(): CacheSetRemoveElement.Error;
|
64
30
|
}
|
31
|
+
export type Response = Success | Error;
|
65
32
|
export {};
|
@@ -1,42 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Error = exports.Success =
|
3
|
+
exports.Error = exports.Success = void 0;
|
4
4
|
const CacheSetRemoveElement = require("./cache-set-remove-element");
|
5
5
|
const response_base_1 = require("./response-base");
|
6
|
-
|
7
|
-
}
|
8
|
-
class _Error extends response_base_1.ResponseBase {
|
9
|
-
constructor(_innerException) {
|
10
|
-
super();
|
11
|
-
this._innerException = _innerException;
|
12
|
-
}
|
13
|
-
}
|
14
|
-
/**
|
15
|
-
* Parent response type for a set remove elements request. The
|
16
|
-
* response object is resolved to a type-safe object of one of
|
17
|
-
* the following subtypes:
|
18
|
-
*
|
19
|
-
* - {Success}
|
20
|
-
* - {Error}
|
21
|
-
*
|
22
|
-
* `instanceof` type guards can be used to operate on the appropriate subtype.
|
23
|
-
* @example
|
24
|
-
* For example:
|
25
|
-
* ```
|
26
|
-
* if (response instanceof CacheSetRemoveElements.Error) {
|
27
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
28
|
-
* // `CacheSetRemoveElements.Error` in this block, so you will have access to the properties
|
29
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
30
|
-
* }
|
31
|
-
* ```
|
32
|
-
*/
|
33
|
-
class Response extends response_base_1.ResponseBase {
|
34
|
-
}
|
35
|
-
exports.Response = Response;
|
6
|
+
const enums_1 = require("./enums");
|
36
7
|
/**
|
37
8
|
* Indicates a Successful set remove elements request.
|
38
9
|
*/
|
39
|
-
class Success extends
|
10
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
11
|
+
constructor() {
|
12
|
+
super(...arguments);
|
13
|
+
this.type = enums_1.CacheSetRemoveElementsResponse.Success;
|
14
|
+
}
|
40
15
|
toSingularResponse() {
|
41
16
|
return new CacheSetRemoveElement.Success();
|
42
17
|
}
|
@@ -52,10 +27,14 @@ exports.Success = Success;
|
|
52
27
|
* - `message()` - a human-readable description of the error
|
53
28
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
54
29
|
*/
|
55
|
-
class Error extends
|
30
|
+
class Error extends response_base_1.BaseResponseError {
|
31
|
+
constructor(_innerException) {
|
32
|
+
super(_innerException);
|
33
|
+
this.type = enums_1.CacheSetRemoveElementsResponse.Error;
|
34
|
+
}
|
56
35
|
toSingularResponse() {
|
57
36
|
return new CacheSetRemoveElement.Error(this._innerException);
|
58
37
|
}
|
59
38
|
}
|
60
39
|
exports.Error = Error;
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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xlIHRoZSBlcnJvcjpcbiAqXG4gKiAtIGBlcnJvckNvZGUoKWAgLSBhIHVuaXF1ZSBNb21lbnRvIGVycm9yIGNvZGUgaW5kaWNhdGluZyB0aGUgdHlwZSBvZiBlcnJvciB0aGF0IG9jY3VycmVkLlxuICogLSBgbWVzc2FnZSgpYCAtIGEgaHVtYW4tcmVhZGFibGUgZGVzY3JpcHRpb24gb2YgdGhlIGVycm9yXG4gKiAtIGBpbm5lckV4Y2VwdGlvbigpYCAtIHRoZSBvcmlnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgQmFzZVJlc3BvbnNlRXJyb3IgaW1wbGVtZW50cyBJUmVzcG9uc2Uge1xuICByZWFkb25seSB0eXBlOiBDYWNoZVNldFJlbW92ZUVsZW1lbnRzUmVzcG9uc2UuRXJyb3IgPVxuICAgIENhY2hlU2V0UmVtb3ZlRWxlbWVudHNSZXNwb25zZS5FcnJvcjtcbiAgY29uc3RydWN0b3IoX2lubmVyRXhjZXB0aW9uOiBTZGtFcnJvcikge1xuICAgIHN1cGVyKF9pbm5lckV4Y2VwdGlvbik7XG4gIH1cbiAgdG9TaW5ndWxhclJlc3BvbnNlKCk6IENhY2hlU2V0UmVtb3ZlRWxlbWVudC5FcnJvciB7XG4gICAgcmV0dXJuIG5ldyBDYWNoZVNldFJlbW92ZUVsZW1lbnQuRXJyb3IodGhpcy5faW5uZXJFeGNlcHRpb24pO1xuICB9XG59XG5cbmV4cG9ydCB0eXBlIFJlc3BvbnNlID0gU3VjY2VzcyB8IEVycm9yO1xuIl19
|
@@ -1,30 +1,17 @@
|
|
1
|
-
import { ResponseBase } from './response-base';
|
1
|
+
import { ResponseBase, BaseResponseMiss, BaseResponseError } from './response-base';
|
2
2
|
import { SdkError } from '../../errors';
|
3
|
-
|
4
|
-
|
5
|
-
* response object is resolved to a type-safe object of one of
|
6
|
-
* the following subtypes:
|
7
|
-
*
|
8
|
-
* - {Hit}
|
9
|
-
* - {Miss}
|
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 CacheSetSample.Error) {
|
17
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
18
|
-
* // `CacheSetSample.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 {
|
3
|
+
import { CacheSetSampleResponse } from './enums';
|
4
|
+
interface IResponse {
|
24
5
|
value(): string[] | undefined;
|
6
|
+
readonly type: CacheSetSampleResponse;
|
25
7
|
}
|
26
|
-
|
8
|
+
/**
|
9
|
+
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
10
|
+
* `value*` accessors to retrieve the data in the appropriate format.
|
11
|
+
*/
|
12
|
+
export declare class Hit extends ResponseBase implements IResponse {
|
27
13
|
private readonly elements;
|
14
|
+
readonly type: CacheSetSampleResponse.Hit;
|
28
15
|
constructor(elements: Uint8Array[]);
|
29
16
|
/**
|
30
17
|
* Returns the data as a Set whose values are utf-8 strings, decoded from the underlying byte arrays. This
|
@@ -70,40 +57,13 @@ declare class _Hit extends Response {
|
|
70
57
|
valueArrayUint8Array(): Uint8Array[];
|
71
58
|
toString(): string;
|
72
59
|
}
|
73
|
-
declare const Hit_base: {
|
74
|
-
new (...args: any[]): {};
|
75
|
-
} & typeof _Hit;
|
76
|
-
/**
|
77
|
-
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
78
|
-
* `value*` accessors to retrieve the data in the appropriate format.
|
79
|
-
*/
|
80
|
-
export declare class Hit extends Hit_base {
|
81
|
-
}
|
82
|
-
declare class _Miss extends Response {
|
83
|
-
}
|
84
|
-
declare const Miss_base: {
|
85
|
-
new (...args: any[]): {
|
86
|
-
readonly is_miss: boolean;
|
87
|
-
};
|
88
|
-
} & typeof _Miss;
|
89
60
|
/**
|
90
61
|
* Indicates that the requested data was not available in the cache.
|
91
62
|
*/
|
92
|
-
export declare class Miss extends
|
93
|
-
|
94
|
-
|
95
|
-
_innerException: SdkError;
|
96
|
-
constructor(_innerException: SdkError);
|
63
|
+
export declare class Miss extends BaseResponseMiss implements IResponse {
|
64
|
+
readonly type: CacheSetSampleResponse.Miss;
|
65
|
+
value(): undefined;
|
97
66
|
}
|
98
|
-
declare const Error_base: {
|
99
|
-
new (...args: any[]): {
|
100
|
-
_innerException: SdkError;
|
101
|
-
message(): string;
|
102
|
-
innerException(): SdkError;
|
103
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
104
|
-
toString(): string;
|
105
|
-
};
|
106
|
-
} & typeof _Error;
|
107
67
|
/**
|
108
68
|
* Indicates that an error occurred during the set sample request.
|
109
69
|
*
|
@@ -114,6 +74,10 @@ declare const Error_base: {
|
|
114
74
|
* - `message()` - a human-readable description of the error
|
115
75
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
116
76
|
*/
|
117
|
-
export declare class Error extends
|
77
|
+
export declare class Error extends BaseResponseError {
|
78
|
+
readonly type: CacheSetSampleResponse.Error;
|
79
|
+
constructor(_innerException: SdkError);
|
80
|
+
value(): undefined;
|
118
81
|
}
|
82
|
+
export type Response = Hit | Miss | Error;
|
119
83
|
export {};
|
@@ -1,41 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Error = exports.Miss = exports.Hit =
|
3
|
+
exports.Error = exports.Miss = exports.Hit = void 0;
|
4
4
|
const response_base_1 = require("./response-base");
|
5
5
|
const utils_1 = require("../../internal/utils");
|
6
|
+
const enums_1 = require("./enums");
|
6
7
|
const TEXT_DECODER = new TextDecoder();
|
7
8
|
/**
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* the following subtypes:
|
11
|
-
*
|
12
|
-
* - {Hit}
|
13
|
-
* - {Miss}
|
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 CacheSetSample.Error) {
|
21
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
22
|
-
* // `CacheSetSample.Error` in this block, so you will have access to the properties
|
23
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
24
|
-
* }
|
25
|
-
* ```
|
9
|
+
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
10
|
+
* `value*` accessors to retrieve the data in the appropriate format.
|
26
11
|
*/
|
27
|
-
class
|
28
|
-
value() {
|
29
|
-
if (this instanceof Hit) {
|
30
|
-
return this.value();
|
31
|
-
}
|
32
|
-
return undefined;
|
33
|
-
}
|
34
|
-
}
|
35
|
-
exports.Response = Response;
|
36
|
-
class _Hit extends Response {
|
12
|
+
class Hit extends response_base_1.ResponseBase {
|
37
13
|
constructor(elements) {
|
38
14
|
super();
|
15
|
+
this.type = enums_1.CacheSetSampleResponse.Hit;
|
39
16
|
this.elements = elements;
|
40
17
|
}
|
41
18
|
/**
|
@@ -99,27 +76,20 @@ class _Hit extends Response {
|
|
99
76
|
return `${super.toString()}: [${truncatedStringArray.toString()}]`;
|
100
77
|
}
|
101
78
|
}
|
102
|
-
/**
|
103
|
-
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
104
|
-
* `value*` accessors to retrieve the data in the appropriate format.
|
105
|
-
*/
|
106
|
-
class Hit extends (0, response_base_1.ResponseHit)(_Hit) {
|
107
|
-
}
|
108
79
|
exports.Hit = Hit;
|
109
|
-
class _Miss extends Response {
|
110
|
-
}
|
111
80
|
/**
|
112
81
|
* Indicates that the requested data was not available in the cache.
|
113
82
|
*/
|
114
|
-
class Miss extends
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
83
|
+
class Miss extends response_base_1.BaseResponseMiss {
|
84
|
+
constructor() {
|
85
|
+
super(...arguments);
|
86
|
+
this.type = enums_1.CacheSetSampleResponse.Miss;
|
87
|
+
}
|
88
|
+
value() {
|
89
|
+
return undefined;
|
121
90
|
}
|
122
91
|
}
|
92
|
+
exports.Miss = Miss;
|
123
93
|
/**
|
124
94
|
* Indicates that an error occurred during the set sample request.
|
125
95
|
*
|
@@ -130,7 +100,14 @@ class _Error extends Response {
|
|
130
100
|
* - `message()` - a human-readable description of the error
|
131
101
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
132
102
|
*/
|
133
|
-
class Error extends
|
103
|
+
class Error extends response_base_1.BaseResponseError {
|
104
|
+
constructor(_innerException) {
|
105
|
+
super(_innerException);
|
106
|
+
this.type = enums_1.CacheSetSampleResponse.Error;
|
107
|
+
}
|
108
|
+
value() {
|
109
|
+
return undefined;
|
110
|
+
}
|
134
111
|
}
|
135
112
|
exports.Error = Error;
|
136
|
-
//# sourceMappingURL=data:application/json;base64,
|
113
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc2V0LXNhbXBsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtc2V0LXNhbXBsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFJeUI7QUFFekIsZ0RBQXlEO0FBQ3pELG1DQUErQztBQUUvQyxNQUFNLFlBQVksR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO0FBT3ZDOzs7R0FHRztBQUNILE1BQWEsR0FBSSxTQUFRLDRCQUFZO0lBSW5DLFlBQVksUUFBc0I7UUFDaEMsS0FBSyxFQUFFLENBQUM7UUFIRCxTQUFJLEdBQStCLDhCQUFzQixDQUFDLEdBQUcsQ0FBQ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xuXG5leHBvcnQgdHlwZSBSZXNwb25zZSA9IEhpdCB8IE1pc3MgfCBFcnJvcjtcbiJdfQ==
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { SdkError } from '../../errors';
|
2
2
|
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
-
import {
|
3
|
+
import { CacheSetResponse } from './enums';
|
4
4
|
interface IResponse {
|
5
|
-
type:
|
5
|
+
readonly type: CacheSetResponse;
|
6
6
|
}
|
7
7
|
/**
|
8
8
|
* Indicates a Successful cache set request.
|
9
9
|
*/
|
10
10
|
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
-
readonly type:
|
11
|
+
readonly type: CacheSetResponse.Success;
|
12
12
|
}
|
13
13
|
/**
|
14
14
|
* Indicates that an error occurred during the cache set request.
|
@@ -22,7 +22,7 @@ export declare class Success extends BaseResponseSuccess implements IResponse {
|
|
22
22
|
*/
|
23
23
|
export declare class Error extends BaseResponseError implements IResponse {
|
24
24
|
constructor(_innerException: SdkError);
|
25
|
-
readonly type:
|
25
|
+
readonly type: CacheSetResponse.Error;
|
26
26
|
}
|
27
27
|
export type Response = Success | Error;
|
28
28
|
export {};
|
@@ -9,7 +9,7 @@ const enums_1 = require("./enums");
|
|
9
9
|
class Success extends response_base_1.BaseResponseSuccess {
|
10
10
|
constructor() {
|
11
11
|
super(...arguments);
|
12
|
-
this.type = enums_1.
|
12
|
+
this.type = enums_1.CacheSetResponse.Success;
|
13
13
|
}
|
14
14
|
}
|
15
15
|
exports.Success = Success;
|
@@ -26,8 +26,8 @@ exports.Success = Success;
|
|
26
26
|
class Error extends response_base_1.BaseResponseError {
|
27
27
|
constructor(_innerException) {
|
28
28
|
super(_innerException);
|
29
|
-
this.type = enums_1.
|
29
|
+
this.type = enums_1.CacheSetResponse.Error;
|
30
30
|
}
|
31
31
|
}
|
32
32
|
exports.Error = Error;
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ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8IEVycm9yO1xuIl19
|
@@ -1,35 +1,22 @@
|
|
1
|
-
import { ResponseBase } from './response-base';
|
2
|
-
import { SdkError } from '../../errors';
|
1
|
+
import { ResponseBase, BaseResponseMiss, BaseResponseError } from './response-base';
|
3
2
|
import { _SortedSetElement } from './grpc-response-types';
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
* the following subtypes:
|
8
|
-
*
|
9
|
-
* - {Hit}
|
10
|
-
* - {Miss}
|
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 CacheSortedSetFetch.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheSortedSetFetch.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
|
-
export declare abstract class Response extends ResponseBase {
|
3
|
+
import { CacheSortedSetFetchResponse } from './enums';
|
4
|
+
import { SdkError } from '../../errors';
|
5
|
+
interface IResponse {
|
25
6
|
value(): {
|
26
7
|
value: string;
|
27
8
|
score: number;
|
28
9
|
}[] | undefined;
|
10
|
+
readonly type: CacheSortedSetFetchResponse;
|
29
11
|
}
|
30
|
-
|
12
|
+
/**
|
13
|
+
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
14
|
+
* `value*` accessors to retrieve the data in the appropriate format.
|
15
|
+
*/
|
16
|
+
export declare class Hit extends ResponseBase implements IResponse {
|
31
17
|
private readonly elements;
|
32
18
|
private readonly _displayListSizeLimit;
|
19
|
+
readonly type: CacheSortedSetFetchResponse.Hit;
|
33
20
|
constructor(elements: _SortedSetElement[]);
|
34
21
|
/**
|
35
22
|
* Returns the elements as an array of objects, each containing a `value` and `score` field.
|
@@ -72,40 +59,13 @@ declare class _Hit extends Response {
|
|
72
59
|
private truncateValueStrings;
|
73
60
|
toString(): string;
|
74
61
|
}
|
75
|
-
declare const Hit_base: {
|
76
|
-
new (...args: any[]): {};
|
77
|
-
} & typeof _Hit;
|
78
|
-
/**
|
79
|
-
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
80
|
-
* `value*` accessors to retrieve the data in the appropriate format.
|
81
|
-
*/
|
82
|
-
export declare class Hit extends Hit_base {
|
83
|
-
}
|
84
|
-
declare class _Miss extends Response {
|
85
|
-
}
|
86
|
-
declare const Miss_base: {
|
87
|
-
new (...args: any[]): {
|
88
|
-
readonly is_miss: boolean;
|
89
|
-
};
|
90
|
-
} & typeof _Miss;
|
91
62
|
/**
|
92
63
|
* Indicates that the requested data was not available in the cache.
|
93
64
|
*/
|
94
|
-
export declare class Miss extends
|
95
|
-
|
96
|
-
|
97
|
-
protected _innerException: SdkError;
|
98
|
-
constructor(_innerException: SdkError);
|
65
|
+
export declare class Miss extends BaseResponseMiss implements IResponse {
|
66
|
+
readonly type: CacheSortedSetFetchResponse.Miss;
|
67
|
+
value(): undefined;
|
99
68
|
}
|
100
|
-
declare const Error_base: {
|
101
|
-
new (...args: any[]): {
|
102
|
-
_innerException: SdkError;
|
103
|
-
message(): string;
|
104
|
-
innerException(): SdkError;
|
105
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
106
|
-
toString(): string;
|
107
|
-
};
|
108
|
-
} & typeof _Error;
|
109
69
|
/**
|
110
70
|
* Indicates that an error occurred during the dictionary fetch request.
|
111
71
|
*
|
@@ -116,6 +76,10 @@ declare const Error_base: {
|
|
116
76
|
* - `message()` - a human-readable description of the error
|
117
77
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
118
78
|
*/
|
119
|
-
export declare class Error extends
|
79
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
80
|
+
readonly type: CacheSortedSetFetchResponse.Error;
|
81
|
+
constructor(error: SdkError);
|
82
|
+
value(): undefined;
|
120
83
|
}
|
84
|
+
export type Response = Hit | Miss | Error;
|
121
85
|
export {};
|