@gomomento/sdk-core 1.86.0 → 1.88.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/auth/credential-provider.d.ts +26 -0
- package/dist/src/auth/credential-provider.js +45 -7
- package/dist/src/errors/errors.js +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -1
- package/dist/src/internal/utils/auth.d.ts +7 -3
- package/dist/src/internal/utils/auth.js +19 -7
- 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 -51
- 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 +18 -54
- package/dist/src/messages/responses/cache-dictionary-fetch.js +23 -46
- package/dist/src/messages/responses/cache-dictionary-get-field.d.ts +19 -58
- package/dist/src/messages/responses/cache-dictionary-get-field.js +19 -52
- package/dist/src/messages/responses/cache-dictionary-get-fields.d.ts +19 -56
- package/dist/src/messages/responses/cache-dictionary-get-fields.js +27 -50
- 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 +19 -54
- package/dist/src/messages/responses/cache-get.js +22 -45
- 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 -46
- 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 -59
- 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 -53
- 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 -63
- 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 +10 -43
- package/dist/src/messages/responses/cache-set.js +13 -34
- package/dist/src/messages/responses/cache-sorted-set-fetch.js +1 -1
- package/dist/src/messages/responses/cache-sorted-set-get-score.d.ts +6 -1
- package/dist/src/messages/responses/cache-sorted-set-get-score.js +1 -1
- package/dist/src/messages/responses/cache-sorted-set-get-scores.js +1 -1
- package/dist/src/messages/responses/cache-sorted-set-increment-score.js +1 -1
- 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 -58
- 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 +5 -0
- package/dist/src/messages/responses/enums/cache/index.js +22 -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/index.d.ts +4 -0
- package/dist/src/messages/responses/enums/index.js +21 -0
- 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 +20 -0
- package/dist/src/messages/responses/response-base.js +42 -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/put-webhook.d.ts +1 -10
- package/package.json +1 -1
@@ -1,29 +1,16 @@
|
|
1
|
-
import { IListResponseSuccess, ResponseBase } from './response-base';
|
2
1
|
import { SdkError } from '../../errors';
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheListConcatenateBackResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheListConcatenateBackResponse;
|
6
|
+
}
|
3
7
|
/**
|
4
|
-
*
|
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 CacheListConcatenateBack.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheListConcatenateBack.Error` in this block, so you will have access to the properties
|
18
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
19
|
-
* }
|
20
|
-
* ```
|
8
|
+
* Indicates a successful list concatenate back request.
|
21
9
|
*/
|
22
|
-
export declare
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
constructor(list_length: number);
|
10
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
+
readonly type: CacheListConcatenateBackResponse.Success;
|
12
|
+
private readonly _listLength;
|
13
|
+
constructor(listLength: number);
|
27
14
|
/**
|
28
15
|
* Returns the new length of the list after the concatenate operation.
|
29
16
|
* @returns {number}
|
@@ -31,27 +18,6 @@ declare class _Success extends Response implements IListResponseSuccess {
|
|
31
18
|
listLength(): number;
|
32
19
|
toString(): string;
|
33
20
|
}
|
34
|
-
declare const Success_base: {
|
35
|
-
new (...args: any[]): {
|
36
|
-
readonly is_success: boolean;
|
37
|
-
};
|
38
|
-
} & typeof _Success;
|
39
|
-
/**
|
40
|
-
* Indicates a Successful list concatenate back request.
|
41
|
-
*/
|
42
|
-
export declare class Success extends Success_base {
|
43
|
-
}
|
44
|
-
declare class _Error extends Response {
|
45
|
-
}
|
46
|
-
declare const Error_base: {
|
47
|
-
new (...args: any[]): {
|
48
|
-
_innerException: SdkError;
|
49
|
-
message(): string;
|
50
|
-
innerException(): SdkError;
|
51
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
52
|
-
toString(): string;
|
53
|
-
};
|
54
|
-
} & typeof _Error;
|
55
21
|
/**
|
56
22
|
* Indicates that an error occurred during the list concatenate back request.
|
57
23
|
*
|
@@ -62,8 +28,9 @@ declare const Error_base: {
|
|
62
28
|
* - `message()` - a human-readable description of the error
|
63
29
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
64
30
|
*/
|
65
|
-
export declare class Error extends
|
66
|
-
_innerException: SdkError;
|
31
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
67
32
|
constructor(_innerException: SdkError);
|
33
|
+
readonly type: CacheListConcatenateBackResponse.Error;
|
68
34
|
}
|
35
|
+
export type Response = Success | Error;
|
69
36
|
export {};
|
@@ -1,53 +1,29 @@
|
|
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
|
+
const enums_1 = require("./enums");
|
5
6
|
/**
|
6
|
-
*
|
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 CacheListConcatenateBack.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheListConcatenateBack.Error` in this block, so you will have access to the properties
|
20
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
21
|
-
* }
|
22
|
-
* ```
|
7
|
+
* Indicates a successful list concatenate back request.
|
23
8
|
*/
|
24
|
-
class
|
25
|
-
|
26
|
-
exports.Response = Response;
|
27
|
-
class _Success extends Response {
|
28
|
-
constructor(list_length) {
|
9
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
10
|
+
constructor(listLength) {
|
29
11
|
super();
|
30
|
-
this.
|
12
|
+
this.type = enums_1.CacheListConcatenateBackResponse.Success;
|
13
|
+
this._listLength = listLength;
|
31
14
|
}
|
32
15
|
/**
|
33
16
|
* Returns the new length of the list after the concatenate operation.
|
34
17
|
* @returns {number}
|
35
18
|
*/
|
36
19
|
listLength() {
|
37
|
-
return this.
|
20
|
+
return this._listLength;
|
38
21
|
}
|
39
22
|
toString() {
|
40
|
-
return `${super.toString()}: listLength: ${this.
|
23
|
+
return `${super.toString()}: listLength: ${this._listLength}`;
|
41
24
|
}
|
42
25
|
}
|
43
|
-
/**
|
44
|
-
* Indicates a Successful list concatenate back request.
|
45
|
-
*/
|
46
|
-
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
47
|
-
}
|
48
26
|
exports.Success = Success;
|
49
|
-
class _Error extends Response {
|
50
|
-
}
|
51
27
|
/**
|
52
28
|
* Indicates that an error occurred during the list concatenate back request.
|
53
29
|
*
|
@@ -58,11 +34,11 @@ class _Error extends Response {
|
|
58
34
|
* - `message()` - a human-readable description of the error
|
59
35
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
60
36
|
*/
|
61
|
-
class Error extends
|
37
|
+
class Error extends response_base_1.BaseResponseError {
|
62
38
|
constructor(_innerException) {
|
63
|
-
super();
|
64
|
-
this.
|
39
|
+
super(_innerException);
|
40
|
+
this.type = enums_1.CacheListConcatenateBackResponse.Error;
|
65
41
|
}
|
66
42
|
}
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gQ2FjaGVMaXN0Q29uY2F0ZW5hdGVCYWNrUmVzcG9uc2UuRXJyb3I7XG59XG5cbmV4cG9ydCB0eXBlIFJlc3BvbnNlID0gU3VjY2VzcyB8IEVycm9yO1xuIl19
|
@@ -1,29 +1,16 @@
|
|
1
|
-
import { IListResponseSuccess, ResponseBase } from './response-base';
|
2
1
|
import { SdkError } from '../../errors';
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheListConcatenateFrontResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheListConcatenateFrontResponse;
|
6
|
+
}
|
3
7
|
/**
|
4
|
-
*
|
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 CacheListConcatenateFront.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheListConcatenateFront.Error` in this block, so you will have access to the properties
|
18
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
19
|
-
* }
|
20
|
-
* ```
|
8
|
+
* Indicates a successful list concatenate front request.
|
21
9
|
*/
|
22
|
-
export declare
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
constructor(list_length: number);
|
10
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
+
readonly type: CacheListConcatenateFrontResponse.Success;
|
12
|
+
private readonly _listLength;
|
13
|
+
constructor(listLength: number);
|
27
14
|
/**
|
28
15
|
* Returns the new length of the list after the concatenate operation.
|
29
16
|
* @returns {number}
|
@@ -31,27 +18,6 @@ declare class _Success extends Response implements IListResponseSuccess {
|
|
31
18
|
listLength(): number;
|
32
19
|
toString(): string;
|
33
20
|
}
|
34
|
-
declare const Success_base: {
|
35
|
-
new (...args: any[]): {
|
36
|
-
readonly is_success: boolean;
|
37
|
-
};
|
38
|
-
} & typeof _Success;
|
39
|
-
/**
|
40
|
-
* Indicates a Successful list concatenate front request.
|
41
|
-
*/
|
42
|
-
export declare class Success extends Success_base {
|
43
|
-
}
|
44
|
-
declare class _Error extends Response {
|
45
|
-
}
|
46
|
-
declare const Error_base: {
|
47
|
-
new (...args: any[]): {
|
48
|
-
_innerException: SdkError;
|
49
|
-
message(): string;
|
50
|
-
innerException(): SdkError;
|
51
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
52
|
-
toString(): string;
|
53
|
-
};
|
54
|
-
} & typeof _Error;
|
55
21
|
/**
|
56
22
|
* Indicates that an error occurred during the list concatenate front request.
|
57
23
|
*
|
@@ -62,8 +28,9 @@ declare const Error_base: {
|
|
62
28
|
* - `message()` - a human-readable description of the error
|
63
29
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
64
30
|
*/
|
65
|
-
export declare class Error extends
|
66
|
-
_innerException: SdkError;
|
31
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
67
32
|
constructor(_innerException: SdkError);
|
33
|
+
readonly type: CacheListConcatenateFrontResponse.Error;
|
68
34
|
}
|
35
|
+
export type Response = Success | Error;
|
69
36
|
export {};
|
@@ -1,53 +1,29 @@
|
|
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
|
+
const enums_1 = require("./enums");
|
5
6
|
/**
|
6
|
-
*
|
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 CacheListConcatenateFront.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheListConcatenateFront.Error` in this block, so you will have access to the properties
|
20
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
21
|
-
* }
|
22
|
-
* ```
|
7
|
+
* Indicates a successful list concatenate front request.
|
23
8
|
*/
|
24
|
-
class
|
25
|
-
|
26
|
-
exports.Response = Response;
|
27
|
-
class _Success extends Response {
|
28
|
-
constructor(list_length) {
|
9
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
10
|
+
constructor(listLength) {
|
29
11
|
super();
|
30
|
-
this.
|
12
|
+
this.type = enums_1.CacheListConcatenateFrontResponse.Success;
|
13
|
+
this._listLength = listLength;
|
31
14
|
}
|
32
15
|
/**
|
33
16
|
* Returns the new length of the list after the concatenate operation.
|
34
17
|
* @returns {number}
|
35
18
|
*/
|
36
19
|
listLength() {
|
37
|
-
return this.
|
20
|
+
return this._listLength;
|
38
21
|
}
|
39
22
|
toString() {
|
40
|
-
return `${super.toString()}: listLength: ${this.
|
23
|
+
return `${super.toString()}: listLength: ${this._listLength}`;
|
41
24
|
}
|
42
25
|
}
|
43
|
-
/**
|
44
|
-
* Indicates a Successful list concatenate front request.
|
45
|
-
*/
|
46
|
-
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
47
|
-
}
|
48
26
|
exports.Success = Success;
|
49
|
-
class _Error extends Response {
|
50
|
-
}
|
51
27
|
/**
|
52
28
|
* Indicates that an error occurred during the list concatenate front request.
|
53
29
|
*
|
@@ -58,11 +34,11 @@ class _Error extends Response {
|
|
58
34
|
* - `message()` - a human-readable description of the error
|
59
35
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
60
36
|
*/
|
61
|
-
class Error extends
|
37
|
+
class Error extends response_base_1.BaseResponseError {
|
62
38
|
constructor(_innerException) {
|
63
|
-
super();
|
64
|
-
this.
|
39
|
+
super(_innerException);
|
40
|
+
this.type = enums_1.CacheListConcatenateFrontResponse.Error;
|
65
41
|
}
|
66
42
|
}
|
67
43
|
exports.Error = Error;
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtbGlzdC1jb25jYXRlbmF0ZS1mcm9udC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtbGlzdC1jb25jYXRlbmF0ZS1mcm9udC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxtREFBdUU7QUFDdkUsbUNBQTBEO0FBTTFEOztHQUVHO0FBQ0gsTUFBYSxPQUFRLFNBQVEsbUNBQW1CO0lBTTlDLFlBQVksVUFBa0I7UUFDNUIsS0FBSyxFQUFFLENBQUM7UUFORCxTQUFJLEdBQ1gseUNBQWlDLENBQUMsT0FBTyxDQUFDO1FBTTFDLElBQUksQ0FBQyxXQUFXLEdBQUcsVUFBVSxDQUFDO0lBQ2hDLENBQUM7SUFFRDs7O09BR0c7SUFDSSxVQUFVO1FBQ2YsT0FBTyxJQUFJLENBQUMsV0FBVyxDQUFDO0lBQzFCLENBQUM7SUFFZSxRQUFRO1FBQ3RCLE9BQU8sR0FBRyxLQUFLLENBQUMsUUFBUSxFQUFFLGlCQUFpQixJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7SUFDaEUsQ0FBQztDQUNGO0FBdEJELDBCQXNCQztBQUVEOzs7Ozs7Ozs7R0FTRztBQUNILE1BQWEsS0FBTSxTQUFRLGlDQUFpQjtJQUMxQyxZQUFZLGVBQXlCO1FBQ25DLEtBQUssQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUdoQixTQUFJLEdBQ1gseUNBQWlDLENBQUMsS0FBSyxDQUFDO0lBSDFDLENBQUM7Q0FJRjtBQVBELHNCQU9DIiwic291cmNlc0NvbnRlbnQiOlsiaW1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JvbnRSZXNwb25zZS5FcnJvciA9XG4gICAgQ2FjaGVMaXN0Q29uY2F0ZW5hdGVGcm9udFJlc3BvbnNlLkVycm9yO1xufVxuXG5leHBvcnQgdHlwZSBSZXNwb25zZSA9IFN1Y2Nlc3MgfCBFcnJvcjtcbiJdfQ==
|
@@ -1,29 +1,16 @@
|
|
1
1
|
import { SdkError } from '../../errors';
|
2
|
-
import { ResponseBase } from './response-base';
|
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 CacheListFetch.Error) {
|
17
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
18
|
-
* // `CacheListFetch.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 {
|
2
|
+
import { BaseResponseError, BaseResponseMiss, ResponseBase } from './response-base';
|
3
|
+
import { CacheListFetchResponse } from './enums';
|
4
|
+
interface IResponse {
|
24
5
|
value(): string[] | undefined;
|
6
|
+
readonly type: CacheListFetchResponse;
|
25
7
|
}
|
26
|
-
|
8
|
+
/**
|
9
|
+
* Indicates that the requested list was successfully retrieved from the cache.
|
10
|
+
* Provides `value*` accessors to retrieve the data in the appropriate format.
|
11
|
+
*/
|
12
|
+
export declare class Hit extends ResponseBase implements IResponse {
|
13
|
+
readonly type: CacheListFetchResponse.Hit;
|
27
14
|
private readonly _values;
|
28
15
|
constructor(values: Uint8Array[]);
|
29
16
|
/**
|
@@ -43,49 +30,23 @@ declare class _Hit extends Response {
|
|
43
30
|
*/
|
44
31
|
valueList(): string[];
|
45
32
|
/**
|
46
|
-
* Returns the data as an array of strings, decoded from the underlying byte array.
|
47
|
-
* for {valueListString}
|
33
|
+
* Returns the data as an array of strings, decoded from the underlying byte array.
|
34
|
+
* This is a convenience alias for {valueListString}
|
48
35
|
* @returns {string[]}
|
49
36
|
*/
|
50
37
|
value(): string[];
|
51
38
|
toString(): string;
|
52
39
|
}
|
53
|
-
declare const Hit_base: {
|
54
|
-
new (...args: any[]): {};
|
55
|
-
} & typeof _Hit;
|
56
|
-
/**
|
57
|
-
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
58
|
-
* `value*` accessors to retrieve the data in the appropriate format.
|
59
|
-
*/
|
60
|
-
export declare class Hit extends Hit_base {
|
61
|
-
}
|
62
|
-
declare class _Miss extends Response {
|
63
|
-
}
|
64
|
-
declare const Miss_base: {
|
65
|
-
new (...args: any[]): {
|
66
|
-
readonly is_miss: boolean;
|
67
|
-
};
|
68
|
-
} & typeof _Miss;
|
69
40
|
/**
|
70
|
-
* Indicates that the requested
|
41
|
+
* Indicates that the requested list was not available in the cache.
|
71
42
|
*/
|
72
|
-
export declare class Miss extends
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
constructor(_innerException: SdkError);
|
43
|
+
export declare class Miss extends BaseResponseMiss implements IResponse {
|
44
|
+
readonly type: CacheListFetchResponse.Miss;
|
45
|
+
constructor();
|
46
|
+
value(): undefined;
|
77
47
|
}
|
78
|
-
declare const Error_base: {
|
79
|
-
new (...args: any[]): {
|
80
|
-
_innerException: SdkError;
|
81
|
-
message(): string;
|
82
|
-
innerException(): SdkError;
|
83
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
84
|
-
toString(): string;
|
85
|
-
};
|
86
|
-
} & typeof _Error;
|
87
48
|
/**
|
88
|
-
* Indicates that an error occurred during the
|
49
|
+
* Indicates that an error occurred during the list fetch request.
|
89
50
|
*
|
90
51
|
* This response object includes the following fields that you can use to determine
|
91
52
|
* how you would like to handle the error:
|
@@ -94,6 +55,10 @@ declare const Error_base: {
|
|
94
55
|
* - `message()` - a human-readable description of the error
|
95
56
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
96
57
|
*/
|
97
|
-
export declare class Error extends
|
58
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
59
|
+
readonly type: CacheListFetchResponse.Error;
|
60
|
+
constructor(_innerException: SdkError);
|
61
|
+
value(): undefined;
|
98
62
|
}
|
63
|
+
export type Response = Hit | Miss | Error;
|
99
64
|
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 CacheListFetch.Error) {
|
21
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
22
|
-
* // `CacheListFetch.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 list was successfully retrieved from the cache.
|
10
|
+
* Provides `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(values) {
|
38
14
|
super();
|
15
|
+
this.type = enums_1.CacheListFetchResponse.Hit;
|
39
16
|
this._values = values;
|
40
17
|
}
|
41
18
|
/**
|
@@ -61,8 +38,8 @@ class _Hit extends Response {
|
|
61
38
|
return this.valueListString();
|
62
39
|
}
|
63
40
|
/**
|
64
|
-
* Returns the data as an array of strings, decoded from the underlying byte array.
|
65
|
-
* for {valueListString}
|
41
|
+
* Returns the data as an array of strings, decoded from the underlying byte array.
|
42
|
+
* This is a convenience alias for {valueListString}
|
66
43
|
* @returns {string[]}
|
67
44
|
*/
|
68
45
|
value() {
|
@@ -73,29 +50,22 @@ class _Hit extends Response {
|
|
73
50
|
return `${super.toString()}: [${truncatedStringArray.toString()}]`;
|
74
51
|
}
|
75
52
|
}
|
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
|
-
class Hit extends (0, response_base_1.ResponseHit)(_Hit) {
|
81
|
-
}
|
82
53
|
exports.Hit = Hit;
|
83
|
-
class _Miss extends Response {
|
84
|
-
}
|
85
54
|
/**
|
86
|
-
* Indicates that the requested
|
55
|
+
* Indicates that the requested list was not available in the cache.
|
87
56
|
*/
|
88
|
-
class Miss extends
|
89
|
-
|
90
|
-
exports.Miss = Miss;
|
91
|
-
class _Error extends Response {
|
92
|
-
constructor(_innerException) {
|
57
|
+
class Miss extends response_base_1.BaseResponseMiss {
|
58
|
+
constructor() {
|
93
59
|
super();
|
94
|
-
this.
|
60
|
+
this.type = enums_1.CacheListFetchResponse.Miss;
|
61
|
+
}
|
62
|
+
value() {
|
63
|
+
return undefined;
|
95
64
|
}
|
96
65
|
}
|
66
|
+
exports.Miss = Miss;
|
97
67
|
/**
|
98
|
-
* Indicates that an error occurred during the
|
68
|
+
* Indicates that an error occurred during the list fetch request.
|
99
69
|
*
|
100
70
|
* This response object includes the following fields that you can use to determine
|
101
71
|
* how you would like to handle the error:
|
@@ -104,7 +74,14 @@ class _Error extends Response {
|
|
104
74
|
* - `message()` - a human-readable description of the error
|
105
75
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
106
76
|
*/
|
107
|
-
class Error extends
|
77
|
+
class Error extends response_base_1.BaseResponseError {
|
78
|
+
constructor(_innerException) {
|
79
|
+
super(_innerException);
|
80
|
+
this.type = enums_1.CacheListFetchResponse.Error;
|
81
|
+
}
|
82
|
+
value() {
|
83
|
+
return undefined;
|
84
|
+
}
|
108
85
|
}
|
109
86
|
exports.Error = Error;
|
110
|
-
//# sourceMappingURL=data:application/json;base64,
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtbGlzdC1mZXRjaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtbGlzdC1mZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxtREFJeUI7QUFDekIsZ0RBQXlEO0FBQ3pELG1DQUErQztBQUUvQyxNQUFNLFlBQVksR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO0FBT3ZDOzs7R0FHRztBQUNILE1BQWEsR0FBSSxTQUFRLDRCQUFZO0lBSW5DLFlBQVksTUFBb0I7UUFDOUIsS0FBSyxFQUFFLENBQUM7UUFKRCxTQUFJLEdBQStCLDhCQUFzQixDQUFDLEdBQUcsQ0FBQztRQUtyRSxJQUFJLENBQUMsT0FBTyxHQUFHLE1BQU0sQ0FBQztJQUN4QixDQUFDO0lBRUQ7OztPQUdHO0lBQ0ksbUJBQW1CO1FBQ3hCLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztJQUN0QixDQUFDO0lBRUQ7OztPQUdHO0lBQ0ksZUFBZTtRQUNwQixPQUFP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