@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,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 dictionary remove field 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 CacheDictionaryRemoveField.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheDictionaryRemoveField.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 dictionary remove field 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.CacheDictionaryRemoveFieldResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the dictionary remove field 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.CacheDictionaryRemoveFieldResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtZGljdGlvbmFyeS1yZW1vdmUtZmllbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL2NhY2hlLWRpY3Rpb25hcnktcmVtb3ZlLWZpZWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG1EQUF1RTtBQUN2RSxtQ0FBMkQ7QUFNM0Q7O0dBRUc7QUFDSCxNQUFhLE9BQVEsU0FBUSxtQ0FBbUI7SUFBaEQ7O1FBQ1csU0FBSSxHQUNYLDBDQUFrQyxDQUFDLE9BQU8sQ0FBQztJQUMvQyxDQUFDO0NBQUE7QUFIRCwwQkFHQztBQUVEOzs7Ozs7Ozs7R0FTRztBQUNILE1BQWEsS0FBTSxTQUFRLGlDQUFpQjtJQUcxQyxZQUFZLGVBQXlCO1FBQ25DLEtBQUssQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUhoQixTQUFJLEdBQ1gsMENBQWtDLENBQUMsS0FBSyxDQUFDO0lBRzNDLENBQUM7Q0FDRjtBQU5ELHNCQU1DIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtTZGtFcnJvcn0gZnJvbSAnLi4vLi4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BvY2N1cnJlZC5cbiAqIC0gYG1lc3NhZ2UoKWAgLSBhIGh1bWFuLXJlYWRhYmxlIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvclxuICogLSBgaW5uZXJFeGNlcHRpb24oKWAgLSB0aGUgb3JpZ2luYWwgZXJyb3IgdGhhdCBjYXVzZWQgdGhlIGZhaWx1cmU7IGNhbiBiZSByZS10aHJvd24uXG4gKi9cbmV4cG9ydCBjbGFzcyBFcnJvciBleHRlbmRzIEJhc2VSZXNwb25zZUVycm9yIGltcGxlbWVudHMgSVJlc3BvbnNlIHtcbiAgcmVhZG9ubHkgdHlwZTogQ2FjaGVEaWN0aW9uYXJ5UmVtb3ZlRmllbGRSZXNwb25zZS5FcnJvciA9XG4gICAgQ2FjaGVEaWN0aW9uYXJ5UmVtb3ZlRmllbGRSZXNwb25zZS5FcnJvcjtcbiAgY29uc3RydWN0b3IoX2lubmVyRXhjZXB0aW9uOiBTZGtFcnJvcikge1xuICAgIHN1cGVyKF9pbm5lckV4Y2VwdGlvbik7XG4gIH1cbn1cblxuZXhwb3J0IHR5cGUgUmVzcG9uc2UgPSBTdWNjZXNzIHwgRXJyb3I7XG4iXX0=
|
@@ -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 CacheDictionaryRemoveFields.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheDictionaryRemoveFields.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheDictionaryRemoveFieldsResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheDictionaryRemoveFieldsResponse;
|
23
6
|
}
|
24
|
-
declare class _Success extends Response {
|
25
|
-
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
8
|
* Indicates a Successful dictionary remove fields 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: CacheDictionaryRemoveFieldsResponse.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 dictionary remove fields 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
|
+
constructor(_innerException: SdkError);
|
25
|
+
readonly type: CacheDictionaryRemoveFieldsResponse.Error;
|
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 dictionary remove fields 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 CacheDictionaryRemoveFields.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheDictionaryRemoveFields.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 dictionary remove fields 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.CacheDictionaryRemoveFieldsResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the dictionary remove fields 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.CacheDictionaryRemoveFieldsResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtZGljdGlvbmFyeS1yZW1vdmUtZmllbGRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jYWNoZS1kaWN0aW9uYXJ5LXJlbW92ZS1maWVsZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBQXVFO0FBQ3ZFLG1DQUE0RDtBQU01RDs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLG1DQUFtQjtJQUFoRDs7UUFDVyxTQUFJLEdBQ1gsMkNBQW1DLENBQUMsT0FBTyxDQUFDO0lBQ2hELENBQUM7Q0FBQTtBQUhELDBCQUdDO0FBRUQ7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBYSxLQUFNLFNBQVEsaUNBQWlCO0lBQzFDLFlBQVksZUFBeUI7UUFDbkMsS0FBSyxDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBR2hCLFNBQUksR0FDWCwyQ0FBbUMsQ0FBQyxLQUFLLENBQUM7SUFINUMsQ0FBQztDQUlGO0FBUEQsc0JBT0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1Nka0Vycm9yfSBmcm9tICcuLi8uLi9lcnJvcnMnO1xuaW1wb3J0IHtCYXNlUmVzcG9uc2VFcnJvciwgQmFzZVJlc3BvbnNlU3VjY2Vzc30gZnJvbSAnLi9yZXNwb25zZS1iYXNlJztcbmltcG9ydCB7Q2FjaGVEaWN0aW9uYXJ5UmVtb3ZlRmllbGRzUmVzcG9uc2V9IG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lnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgQmFzZVJlc3BvbnNlRXJyb3IgaW1wbGVtZW50cyBJUmVzcG9uc2Uge1xuICBjb25zdHJ1Y3RvcihfaW5uZXJFeGNlcHRpb246IFNka0Vycm9yKSB7XG4gICAgc3VwZXIoX2lubmVyRXhjZXB0aW9uKTtcbiAgfVxuXG4gIHJlYWRvbmx5IHR5cGU6IENhY2hlRGljdGlvbmFyeVJlbW92ZUZpZWxkc1Jlc3BvbnNlLkVycm9yID1cbiAgICBDYWNoZURpY3Rpb25hcnlSZW1vdmVGaWVsZHNSZXNwb25zZS5FcnJvcjtcbn1cblxuZXhwb3J0IHR5cGUgUmVzcG9uc2UgPSBTdWNjZXNzIHwgRXJyb3I7XG4iXX0=
|
@@ -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 CacheDictionarySetField.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheDictionarySetField.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheDictionarySetFieldResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheDictionarySetFieldResponse;
|
23
6
|
}
|
24
|
-
declare class _Success extends Response {
|
25
|
-
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
8
|
* Indicates a Successful dictionary set field 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: CacheDictionarySetFieldResponse.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 dictionary set field 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
|
+
constructor(_innerException: SdkError);
|
25
|
+
readonly type: CacheDictionarySetFieldResponse.Error;
|
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 dictionary set field 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 CacheDictionarySetField.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheDictionarySetField.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 dictionary set field 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.CacheDictionarySetFieldResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the dictionary set field 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.CacheDictionarySetFieldResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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1cblxuICByZWFkb25seSB0eXBlOiBDYWNoZURpY3Rpb25hcnlTZXRGaWVsZFJlc3BvbnNlLkVycm9yID1cbiAgICBDYWNoZURpY3Rpb25hcnlTZXRGaWVsZFJlc3BvbnNlLkVycm9yO1xufVxuXG5leHBvcnQgdHlwZSBSZXNwb25zZSA9IFN1Y2Nlc3MgfCBFcnJvcjtcbiJdfQ==
|
@@ -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 CacheDictionarySetFields.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheDictionarySetFields.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { CacheDictionarySetFieldsResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: CacheDictionarySetFieldsResponse;
|
23
6
|
}
|
24
|
-
declare class _Success extends Response {
|
25
|
-
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
8
|
* Indicates a Successful dictionary set fields 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: CacheDictionarySetFieldsResponse.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 dictionary set fields 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
|
+
constructor(_innerException: SdkError);
|
25
|
+
readonly type: CacheDictionarySetFieldsResponse.Error;
|
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 dictionary set fields 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 CacheDictionarySetFields.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheDictionarySetFields.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 dictionary set fields 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.CacheDictionarySetFieldsResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the dictionary set fields 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.CacheDictionarySetFieldsResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtZGljdGlvbmFyeS1zZXQtZmllbGRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jYWNoZS1kaWN0aW9uYXJ5LXNldC1maWVsZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBQXVFO0FBQ3ZFLG1DQUF5RDtBQU16RDs7R0FFRztBQUN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@
|
|
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 CacheFlush.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `CacheFlush.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 {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from './response-base';
|
3
|
+
import { FlushCacheResponse } from './enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: FlushCacheResponse;
|
23
6
|
}
|
24
|
-
declare class _Success extends Response {
|
25
|
-
}
|
26
|
-
declare const Success_base: {
|
27
|
-
new (...args: any[]): {
|
28
|
-
readonly is_success: boolean;
|
29
|
-
};
|
30
|
-
} & typeof _Success;
|
31
7
|
/**
|
32
|
-
* Indicates a
|
8
|
+
* Indicates a successful flush cache 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: FlushCacheResponse.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
|
-
* Indicates that an error occurred during the cache
|
14
|
+
* Indicates that an error occurred during the flush cache request.
|
51
15
|
*
|
52
16
|
* This response object includes the following fields that you can use to determine
|
53
17
|
* how you would like to handle the error:
|
@@ -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
|
+
constructor(_innerException: SdkError);
|
25
|
+
readonly type: FlushCacheResponse.Error;
|
60
26
|
}
|
27
|
+
export type Response = Success | Error;
|
61
28
|
export {};
|
@@ -1,45 +1,20 @@
|
|
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 CacheFlush.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `CacheFlush.Error` in this block, so you will have access to the properties
|
20
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
21
|
-
* }
|
22
|
-
* ```
|
23
|
-
*/
|
24
|
-
class Response extends response_base_1.ResponseBase {
|
25
|
-
}
|
26
|
-
exports.Response = Response;
|
27
|
-
class _Success extends Response {
|
28
|
-
}
|
29
|
-
/**
|
30
|
-
* Indicates a Successful cache flush request.
|
7
|
+
* Indicates a successful flush cache 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.FlushCacheResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
|
-
* Indicates that an error occurred during the cache
|
17
|
+
* Indicates that an error occurred during the flush cache request.
|
43
18
|
*
|
44
19
|
* This response object includes the following fields that you can use to determine
|
45
20
|
* how you would like to handle the error:
|
@@ -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.FlushCacheResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtZmx1c2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL2NhY2hlLWZsdXNoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG1EQUF1RTtBQUN2RSxtQ0FBMkM7QUFNM0M7O0dBRUc7QUFDSCxNQUFhLE9BQVEsU0FBUSxtQ0FBbUI7SUFBaEQ7O1FBQ1csU0FBSSxHQUErQiwwQkFBa0IsQ0FBQyxPQUFPLENBQUM7SUFDekUsQ0FBQztDQUFBO0FBRkQsMEJBRUM7QUFFRDs7Ozs7Ozs7O0dBU0c7QUFDSCxNQUFhLEt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