@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,29 +1,17 @@
|
|
1
|
+
import { BaseResponseError, BaseResponseMiss, ResponseBase } from './response-base';
|
2
|
+
import { CacheSortedSetLengthResponse } from './enums';
|
1
3
|
import { SdkError } from '../../errors';
|
2
|
-
|
4
|
+
interface IResponse {
|
5
|
+
length(): number | undefined;
|
6
|
+
readonly type: CacheSortedSetLengthResponse;
|
7
|
+
}
|
3
8
|
/**
|
4
|
-
*
|
5
|
-
*
|
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 CacheSortedSetLength.Error) {
|
17
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
18
|
-
* // `CacheSortedSetLength.Error` in this block, so you will have access to the properties
|
19
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
20
|
-
* }
|
21
|
-
* ```
|
9
|
+
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
10
|
+
* `value*` accessors to retrieve the data in the appropriate format.
|
22
11
|
*/
|
23
|
-
export declare
|
24
|
-
}
|
25
|
-
declare class _Hit extends Response {
|
12
|
+
export declare class Hit extends ResponseBase implements IResponse {
|
26
13
|
private readonly _length;
|
14
|
+
readonly type: CacheSortedSetLengthResponse.Hit;
|
27
15
|
constructor(length: number);
|
28
16
|
/**
|
29
17
|
* Returns the length of the sorted set
|
@@ -32,40 +20,14 @@ declare class _Hit extends Response {
|
|
32
20
|
length(): number;
|
33
21
|
toString(): string;
|
34
22
|
}
|
35
|
-
declare const Hit_base: {
|
36
|
-
new (...args: any[]): {};
|
37
|
-
} & typeof _Hit;
|
38
|
-
/**
|
39
|
-
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
40
|
-
* `value*` accessors to retrieve the data in the appropriate format.
|
41
|
-
*/
|
42
|
-
export declare class Hit extends Hit_base {
|
43
|
-
}
|
44
|
-
declare class _Miss extends Response {
|
45
|
-
}
|
46
|
-
declare const Miss_base: {
|
47
|
-
new (...args: any[]): {
|
48
|
-
readonly is_miss: boolean;
|
49
|
-
};
|
50
|
-
} & typeof _Miss;
|
51
23
|
/**
|
52
24
|
* Indicates that the requested data was not available in the cache.
|
53
25
|
*/
|
54
|
-
export declare class Miss extends
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
constructor(_innerException: SdkError);
|
26
|
+
export declare class Miss extends BaseResponseMiss implements IResponse {
|
27
|
+
readonly type: CacheSortedSetLengthResponse.Miss;
|
28
|
+
constructor();
|
29
|
+
length(): undefined;
|
59
30
|
}
|
60
|
-
declare const Error_base: {
|
61
|
-
new (...args: any[]): {
|
62
|
-
_innerException: SdkError;
|
63
|
-
message(): string;
|
64
|
-
innerException(): SdkError;
|
65
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
66
|
-
toString(): string;
|
67
|
-
};
|
68
|
-
} & typeof _Error;
|
69
31
|
/**
|
70
32
|
* Indicates that an error occurred during the sorted set length request.
|
71
33
|
*
|
@@ -76,6 +38,10 @@ declare const Error_base: {
|
|
76
38
|
* - `message()` - a human-readable description of the error
|
77
39
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
78
40
|
*/
|
79
|
-
export declare class Error extends
|
41
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
42
|
+
readonly type: CacheSortedSetLengthResponse.Error;
|
43
|
+
constructor(error: SdkError);
|
44
|
+
length(): undefined;
|
80
45
|
}
|
46
|
+
export type Response = Hit | Miss | Error;
|
81
47
|
export {};
|
@@ -1,33 +1,16 @@
|
|
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
|
+
const enums_1 = require("./enums");
|
5
6
|
/**
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* the following subtypes:
|
9
|
-
*
|
10
|
-
* - {Hit}
|
11
|
-
* - {Miss}
|
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 CacheSortedSetLength.Error) {
|
19
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
20
|
-
* // `CacheSortedSetLength.Error` in this block, so you will have access to the properties
|
21
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
22
|
-
* }
|
23
|
-
* ```
|
7
|
+
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
8
|
+
* `value*` accessors to retrieve the data in the appropriate format.
|
24
9
|
*/
|
25
|
-
class
|
26
|
-
}
|
27
|
-
exports.Response = Response;
|
28
|
-
class _Hit extends Response {
|
10
|
+
class Hit extends response_base_1.ResponseBase {
|
29
11
|
constructor(length) {
|
30
12
|
super();
|
13
|
+
this.type = enums_1.CacheSortedSetLengthResponse.Hit;
|
31
14
|
this._length = length;
|
32
15
|
}
|
33
16
|
/**
|
@@ -41,27 +24,20 @@ class _Hit extends Response {
|
|
41
24
|
return `${super.toString()}: length ${this._length}`;
|
42
25
|
}
|
43
26
|
}
|
44
|
-
/**
|
45
|
-
* Indicates that the requested data was successfully retrieved from the cache. Provides
|
46
|
-
* `value*` accessors to retrieve the data in the appropriate format.
|
47
|
-
*/
|
48
|
-
class Hit extends (0, response_base_1.ResponseHit)(_Hit) {
|
49
|
-
}
|
50
27
|
exports.Hit = Hit;
|
51
|
-
class _Miss extends Response {
|
52
|
-
}
|
53
28
|
/**
|
54
29
|
* Indicates that the requested data was not available in the cache.
|
55
30
|
*/
|
56
|
-
class Miss extends
|
57
|
-
|
58
|
-
exports.Miss = Miss;
|
59
|
-
class _Error extends Response {
|
60
|
-
constructor(_innerException) {
|
31
|
+
class Miss extends response_base_1.BaseResponseMiss {
|
32
|
+
constructor() {
|
61
33
|
super();
|
62
|
-
this.
|
34
|
+
this.type = enums_1.CacheSortedSetLengthResponse.Miss;
|
35
|
+
}
|
36
|
+
length() {
|
37
|
+
return undefined;
|
63
38
|
}
|
64
39
|
}
|
40
|
+
exports.Miss = Miss;
|
65
41
|
/**
|
66
42
|
* Indicates that an error occurred during the sorted set length request.
|
67
43
|
*
|
@@ -72,7 +48,14 @@ class _Error extends Response {
|
|
72
48
|
* - `message()` - a human-readable description of the error
|
73
49
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
74
50
|
*/
|
75
|
-
class Error extends
|
51
|
+
class Error extends response_base_1.BaseResponseError {
|
52
|
+
constructor(error) {
|
53
|
+
super(error);
|
54
|
+
this.type = enums_1.CacheSortedSetLengthResponse.Error;
|
55
|
+
}
|
56
|
+
length() {
|
57
|
+
return undefined;
|
58
|
+
}
|
76
59
|
}
|
77
60
|
exports.Error = Error;
|
78
|
-
//# sourceMappingURL=data:application/json;base64,
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc29ydGVkLXNldC1sZW5ndGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL2NhY2hlLXNvcnRlZC1zZXQtbGVuZ3RoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1EQUl5QjtBQUN6QixtQ0FBcUQ7QUFRckQ7OztHQUdHO0FBQ0gsTUFBYSxHQUFJLFNBQVEsNEJBQVk7SUFLbkMsWUFBWSxNQUFjO1FBQ3hCLEtBQUssRUFBRSxDQUFDO1FBSkQsU0FBSSxHQUNYLG9DQUE0QixDQUFDLEdBQUcsQ0FBQztRQUlqQyxJQUFJLENBQUMsT0FBTyxHQUFHLE1BQU0sQ0FBQztJQUN4QixDQUFDO0lBRUQ7OztPQUdHO0lBQ0ksTUFBTTtRQUNYLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztJQUN0QixDQUFDO0lBRWUsUUFBUTtRQUN0QixPQUFPLEdBQUcsS0FBSyxDQUFDLFFBQVEsRUFBRSxZQUFZLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUN2RCxDQUFDO0NBQ0Y7QUFyQkQsa0J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3IoZXJyb3I6IFNka0Vycm9yKSB7XG4gICAgc3VwZXIoZXJyb3IpO1xuICB9XG5cbiAgcHVibGljIGxlbmd0aCgpOiB1bmRlZmluZWQge1xuICAgIHJldHVybiB1bmRlZmluZWQ7XG4gIH1cbn1cblxuZXhwb3J0IHR5cGUgUmVzcG9uc2UgPSBIaXQgfCBNaXNzIHwgRXJyb3I7XG4iXX0=
|
@@ -1,51 +1,15 @@
|
|
1
1
|
import { SdkError } from '../../errors';
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
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 CacheSortedSetPutElement.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheSortedSetPutElement.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheSortedSetPutElementResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheSortedSetPutElementResponse;
|
25
6
|
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
8
|
* Indicates a Successful sorted set put element request.
|
33
9
|
*/
|
34
|
-
export declare class Success extends
|
35
|
-
|
36
|
-
declare class _Error extends Response {
|
37
|
-
protected _innerException: SdkError;
|
38
|
-
constructor(_innerException: SdkError);
|
10
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
+
readonly type: CacheSortedSetPutElementResponse.Success;
|
39
12
|
}
|
40
|
-
declare const Error_base: {
|
41
|
-
new (...args: any[]): {
|
42
|
-
_innerException: SdkError;
|
43
|
-
message(): string;
|
44
|
-
innerException(): SdkError;
|
45
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
46
|
-
toString(): string;
|
47
|
-
};
|
48
|
-
} & typeof _Error;
|
49
13
|
/**
|
50
14
|
* Indicates that an error occurred during the sorted set put element request.
|
51
15
|
*
|
@@ -56,6 +20,9 @@ declare const Error_base: {
|
|
56
20
|
* - `message()` - a human-readable description of the error
|
57
21
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
58
22
|
*/
|
59
|
-
export declare class Error extends
|
23
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
24
|
+
readonly type: CacheSortedSetPutElementResponse.Error;
|
25
|
+
constructor(error: SdkError);
|
60
26
|
}
|
27
|
+
export type Response = Success | Error;
|
61
28
|
export {};
|
@@ -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 sorted set put 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 CacheSortedSetPutElement.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheSortedSetPutElement.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 sorted set put 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.CacheSortedSetPutElementResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the sorted set put 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(error) {
|
28
|
+
super(error);
|
29
|
+
this.type = enums_1.CacheSortedSetPutElementResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc29ydGVkLXNldC1wdXQtZWxlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtc29ydGVkLXNldC1wdXQtZWxlbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxtREFBdUU7QUFDdkUsbUNBQXlEO0FBTXpEOztHQUVHO0FBQ0gsTUFBYSxP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
-
|
5
|
-
|
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 CacheSortedSetPutElements.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheSortedSetPutElements.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheSortedSetPutElementsResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheSortedSetPutElementsResponse;
|
25
6
|
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
8
|
* Indicates a Successful sorted set put element request.
|
33
9
|
*/
|
34
|
-
export declare class Success extends
|
35
|
-
|
36
|
-
declare class _Error extends Response {
|
37
|
-
protected _innerException: SdkError;
|
38
|
-
constructor(_innerException: SdkError);
|
10
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
+
readonly type: CacheSortedSetPutElementsResponse.Success;
|
39
12
|
}
|
40
|
-
declare const Error_base: {
|
41
|
-
new (...args: any[]): {
|
42
|
-
_innerException: SdkError;
|
43
|
-
message(): string;
|
44
|
-
innerException(): SdkError;
|
45
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
46
|
-
toString(): string;
|
47
|
-
};
|
48
|
-
} & typeof _Error;
|
49
13
|
/**
|
50
14
|
* Indicates that an error occurred during the sorted set put elements request.
|
51
15
|
*
|
@@ -56,6 +20,9 @@ declare const Error_base: {
|
|
56
20
|
* - `message()` - a human-readable description of the error
|
57
21
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
58
22
|
*/
|
59
|
-
export declare class Error extends
|
23
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
24
|
+
readonly type: CacheSortedSetPutElementsResponse.Error;
|
25
|
+
constructor(error: SdkError);
|
60
26
|
}
|
27
|
+
export type Response = Success | Error;
|
61
28
|
export {};
|
@@ -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 sorted set put elements 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 CacheSortedSetPutElements.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheSortedSetPutElements.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 sorted set put 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.CacheSortedSetPutElementsResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the sorted set put elements 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(error) {
|
28
|
+
super(error);
|
29
|
+
this.type = enums_1.CacheSortedSetPutElementsResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc29ydGVkLXNldC1wdXQtZWxlbWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL2NhY2hlLXNvcnRlZC1zZXQtcHV0LWVsZW1lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG1EQUF1RTtBQUN2RSxtQ0FBMEQ7QUFNMUQ7O0dBRUc7QUFDSCxNQUFhLE9BQVEsU0FBUSxtQ0FBbUI7SUFBaEQ7O1FBQ1csU0FBSSxHQUNYLHlDQUFpQyxDQUFDLE9BQU8sQ0FBQztJQUM5QyxDQUFDO0NBQUE7QUFIRCwwQkFHQztBQUVEOzs7Ozs7Ozs7R0FTRztBQUNILE1BQWEsS0FBTSxTQUFRLGlDQUFpQjtJQUkxQyxZQUFZLEtBQWU7UUFDekIsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBSk4sU0FBSSxHQUNY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xlIHRoZSBlcnJvcjpcbiAqXG4gKiAtIGBlcnJvckNvZGUoKWAgLSBhIHVuaXF1ZSBNb21lbnRvIGVycm9yIGNvZGUgaW5kaWNhdGluZyB0aGUgdHlwZSBvZiBlcnJvciB0aGF0IG9jY3VycmVkLlxuICogLSBgbWVzc2FnZSgpYCAtIGEgaHVtYW4tcmVhZGFibGUgZGVzY3JpcHRpb24gb2YgdGhlIGVycm9yXG4gKiAtIGBpbm5lckV4Y2VwdGlvbigpYCAtIHRoZSBvcmlnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgQmFzZVJlc3BvbnNlRXJyb3IgaW1wbGVtZW50cyBJUmVzcG9uc2Uge1xuICByZWFkb25seSB0eXBlOiBDYWNoZVNvcnRlZFNldFB1dEVsZW1lbnRzUmVzcG9uc2UuRXJyb3IgPVxuICAgIENhY2hlU29ydGVkU2V0UHV0RWxlbWVudHNSZXNwb25zZS5FcnJvcjtcblxuICBjb25zdHJ1Y3RvcihlcnJvcjogU2RrRXJyb3IpIHtcbiAgICBzdXBlcihlcnJvcik7XG4gIH1cbn1cblxuZXhwb3J0IHR5cGUgUmVzcG9uc2UgPSBTdWNjZXNzIHwgRXJyb3I7XG4iXX0=
|
@@ -1,51 +1,15 @@
|
|
1
1
|
import { SdkError } from '../../errors';
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
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 CacheSortedSetRemoveElement.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheSortedSetRemoveElement.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheSortedSetRemoveElementResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheSortedSetRemoveElementResponse;
|
25
6
|
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
8
|
* Indicates a Successful sorted set put element request.
|
33
9
|
*/
|
34
|
-
export declare class Success extends
|
35
|
-
|
36
|
-
declare class _Error extends Response {
|
37
|
-
protected _innerException: SdkError;
|
38
|
-
constructor(_innerException: SdkError);
|
10
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
+
readonly type: CacheSortedSetRemoveElementResponse.Success;
|
39
12
|
}
|
40
|
-
declare const Error_base: {
|
41
|
-
new (...args: any[]): {
|
42
|
-
_innerException: SdkError;
|
43
|
-
message(): string;
|
44
|
-
innerException(): SdkError;
|
45
|
-
errorCode(): import("../../errors").MomentoErrorCode;
|
46
|
-
toString(): string;
|
47
|
-
};
|
48
|
-
} & typeof _Error;
|
49
13
|
/**
|
50
14
|
* Indicates that an error occurred during the sorted set put element request.
|
51
15
|
*
|
@@ -56,6 +20,9 @@ declare const Error_base: {
|
|
56
20
|
* - `message()` - a human-readable description of the error
|
57
21
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
58
22
|
*/
|
59
|
-
export declare class Error extends
|
23
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
24
|
+
readonly type: CacheSortedSetRemoveElementResponse.Error;
|
25
|
+
constructor(error: SdkError);
|
60
26
|
}
|
27
|
+
export type Response = Success | Error;
|
61
28
|
export {};
|
@@ -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 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
|
-
}
|
5
|
+
const enums_1 = require("./enums");
|
29
6
|
/**
|
30
7
|
* Indicates a Successful sorted set put 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.CacheSortedSetRemoveElementResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the sorted set put 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(error) {
|
28
|
+
super(error);
|
29
|
+
this.type = enums_1.CacheSortedSetRemoveElementResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc29ydGVkLXNldC1yZW1vdmUtZWxlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtc29ydGVkLXNldC1yZW1vdmUtZWxlbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxtREFBdUU7QUFDdkUsbUNBQTREO0FBTTVEOztHQUVHO0FBQ0gsTUFBYSxPQUFRLFNBQVEsbUNBQW1CO0lBQWhEOztRQUNXLFNBQUksR0FDWCwyQ0FBbUMsQ0FBQyxPQUFPLENBQUM7SUFDaEQsQ0FBQztDQUFBO0FBSEQsMEJBR0M7QUFFRDs7Ozs7Ozs7O0dBU0c7QUFDSCxNQUFhLEtBQU0sU0FBUSxpQ0FBaUI7SUFJMUMsWUFBWSxLQUFlO1FBQ3pCLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUpOLFNBQUksR0FDWCwyQ0FBbUMsQ0FBQyxLQUFLLENBQUM7SUFJNUMsQ0FBQztDQUNGO0FBUEQsc0JBT0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1Nka0Vycm9yfSBmcm9tICcuLi8uLi9lcnJvcnMnO1xuaW1wb3J0IHtCYXNlUmVzcG9uc2VFcnJvciwgQmFzZVJlc3BvbnNlU3VjY2Vzc30gZnJvbSAnLi9yZXNwb25zZS1iYXNl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