@gomomento/sdk-core 1.12.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/src/auth/credential-provider.d.ts +83 -0
  2. package/dist/src/auth/credential-provider.js +82 -0
  3. package/dist/src/auth/index.d.ts +1 -0
  4. package/dist/src/auth/index.js +18 -0
  5. package/dist/src/config/logging/default-momento-logger.d.ts +24 -0
  6. package/dist/src/config/logging/default-momento-logger.js +69 -0
  7. package/dist/src/config/logging/index.d.ts +3 -0
  8. package/dist/src/config/logging/index.js +20 -0
  9. package/dist/src/config/logging/momento-logger.d.ts +10 -0
  10. package/dist/src/config/logging/momento-logger.js +3 -0
  11. package/dist/src/config/logging/noop-momento-logger.d.ts +11 -0
  12. package/dist/src/config/logging/noop-momento-logger.js +34 -0
  13. package/dist/src/config/transport/grpc-configuration.d.ts +41 -0
  14. package/dist/src/config/transport/grpc-configuration.js +3 -0
  15. package/dist/src/config/transport/index.d.ts +2 -0
  16. package/dist/src/config/transport/index.js +19 -0
  17. package/dist/src/config/transport/transport-strategy.d.ts +77 -0
  18. package/dist/src/config/transport/transport-strategy.js +60 -0
  19. package/dist/src/errors/error-utils.d.ts +2 -0
  20. package/dist/src/errors/error-utils.js +12 -0
  21. package/dist/src/errors/errors.d.ts +140 -0
  22. package/dist/src/errors/errors.js +229 -0
  23. package/dist/src/errors/index.d.ts +2 -0
  24. package/dist/src/errors/index.js +19 -0
  25. package/dist/src/index.d.ts +57 -0
  26. package/dist/src/index.js +137 -0
  27. package/dist/src/internal/clients/auth/AbstractAuthClient.d.ts +10 -0
  28. package/dist/src/internal/clients/auth/AbstractAuthClient.js +13 -0
  29. package/dist/src/internal/clients/auth/IAuthClient.d.ts +4 -0
  30. package/dist/src/internal/clients/auth/IAuthClient.js +3 -0
  31. package/dist/src/internal/clients/auth/index.d.ts +2 -0
  32. package/dist/src/internal/clients/auth/index.js +19 -0
  33. package/dist/src/internal/clients/cache/AbstractCacheClient.d.ts +638 -0
  34. package/dist/src/internal/clients/cache/AbstractCacheClient.js +870 -0
  35. package/dist/src/internal/clients/cache/ICacheClient.d.ts +45 -0
  36. package/dist/src/internal/clients/cache/ICacheClient.js +3 -0
  37. package/dist/src/internal/clients/cache/IControlClient.d.ts +7 -0
  38. package/dist/src/internal/clients/cache/IControlClient.js +3 -0
  39. package/dist/src/internal/clients/cache/IDataClient.d.ts +29 -0
  40. package/dist/src/internal/clients/cache/IDataClient.js +3 -0
  41. package/dist/src/internal/clients/cache/index.d.ts +4 -0
  42. package/dist/src/internal/clients/cache/index.js +21 -0
  43. package/dist/src/internal/clients/index.d.ts +3 -0
  44. package/dist/src/internal/clients/index.js +20 -0
  45. package/dist/src/internal/clients/ping/AbstractPingClient.d.ts +25 -0
  46. package/dist/src/internal/clients/ping/AbstractPingClient.js +29 -0
  47. package/dist/src/internal/clients/ping/IPingClient.d.ts +3 -0
  48. package/dist/src/internal/clients/ping/IPingClient.js +3 -0
  49. package/dist/src/internal/clients/ping/index.d.ts +2 -0
  50. package/dist/src/internal/clients/ping/index.js +19 -0
  51. package/dist/src/internal/subscription-state.d.ts +15 -0
  52. package/dist/src/internal/subscription-state.js +38 -0
  53. package/dist/src/internal/utils/auth.d.ts +25 -0
  54. package/dist/src/internal/utils/auth.js +50 -0
  55. package/dist/src/internal/utils/collections.d.ts +1 -0
  56. package/dist/src/internal/utils/collections.js +8 -0
  57. package/dist/src/internal/utils/display.d.ts +2 -0
  58. package/dist/src/internal/utils/display.js +30 -0
  59. package/dist/src/internal/utils/index.d.ts +7 -0
  60. package/dist/src/internal/utils/index.js +24 -0
  61. package/dist/src/internal/utils/object.d.ts +1 -0
  62. package/dist/src/internal/utils/object.js +8 -0
  63. package/dist/src/internal/utils/sleep.d.ts +1 -0
  64. package/dist/src/internal/utils/sleep.js +6 -0
  65. package/dist/src/internal/utils/string.d.ts +2 -0
  66. package/dist/src/internal/utils/string.js +17 -0
  67. package/dist/src/internal/utils/validators.d.ts +13 -0
  68. package/dist/src/internal/utils/validators.js +105 -0
  69. package/dist/src/internal/vendor/printf/README.md +31 -0
  70. package/dist/src/internal/vendor/printf/printf.d.ts +9 -0
  71. package/dist/src/internal/vendor/printf/printf.js +478 -0
  72. package/dist/src/messages/cache-info.d.ts +5 -0
  73. package/dist/src/messages/cache-info.js +13 -0
  74. package/dist/src/messages/responses/cache-delete.d.ts +61 -0
  75. package/dist/src/messages/responses/cache-delete.js +54 -0
  76. package/dist/src/messages/responses/cache-dictionary-fetch.d.ts +120 -0
  77. package/dist/src/messages/responses/cache-dictionary-fetch.js +162 -0
  78. package/dist/src/messages/responses/cache-dictionary-get-field.d.ts +123 -0
  79. package/dist/src/messages/responses/cache-dictionary-get-field.js +143 -0
  80. package/dist/src/messages/responses/cache-dictionary-get-fields.d.ts +122 -0
  81. package/dist/src/messages/responses/cache-dictionary-get-fields.js +173 -0
  82. package/dist/src/messages/responses/cache-dictionary-increment.d.ts +69 -0
  83. package/dist/src/messages/responses/cache-dictionary-increment.js +68 -0
  84. package/dist/src/messages/responses/cache-dictionary-remove-field.d.ts +61 -0
  85. package/dist/src/messages/responses/cache-dictionary-remove-field.js +54 -0
  86. package/dist/src/messages/responses/cache-dictionary-remove-fields.d.ts +61 -0
  87. package/dist/src/messages/responses/cache-dictionary-remove-fields.js +54 -0
  88. package/dist/src/messages/responses/cache-dictionary-set-field.d.ts +61 -0
  89. package/dist/src/messages/responses/cache-dictionary-set-field.js +54 -0
  90. package/dist/src/messages/responses/cache-dictionary-set-fields.d.ts +61 -0
  91. package/dist/src/messages/responses/cache-dictionary-set-fields.js +54 -0
  92. package/dist/src/messages/responses/cache-flush.d.ts +61 -0
  93. package/dist/src/messages/responses/cache-flush.js +54 -0
  94. package/dist/src/messages/responses/cache-get.d.ts +86 -0
  95. package/dist/src/messages/responses/cache-get.js +88 -0
  96. package/dist/src/messages/responses/cache-increment.d.ts +69 -0
  97. package/dist/src/messages/responses/cache-increment.js +68 -0
  98. package/dist/src/messages/responses/cache-list-concatenate-back.d.ts +69 -0
  99. package/dist/src/messages/responses/cache-list-concatenate-back.js +68 -0
  100. package/dist/src/messages/responses/cache-list-concatenate-front.d.ts +69 -0
  101. package/dist/src/messages/responses/cache-list-concatenate-front.js +68 -0
  102. package/dist/src/messages/responses/cache-list-fetch.d.ts +92 -0
  103. package/dist/src/messages/responses/cache-list-fetch.js +96 -0
  104. package/dist/src/messages/responses/cache-list-length.d.ts +84 -0
  105. package/dist/src/messages/responses/cache-list-length.js +78 -0
  106. package/dist/src/messages/responses/cache-list-pop-back.d.ts +86 -0
  107. package/dist/src/messages/responses/cache-list-pop-back.js +88 -0
  108. package/dist/src/messages/responses/cache-list-pop-front.d.ts +86 -0
  109. package/dist/src/messages/responses/cache-list-pop-front.js +88 -0
  110. package/dist/src/messages/responses/cache-list-push-back.d.ts +69 -0
  111. package/dist/src/messages/responses/cache-list-push-back.js +68 -0
  112. package/dist/src/messages/responses/cache-list-push-front.d.ts +69 -0
  113. package/dist/src/messages/responses/cache-list-push-front.js +68 -0
  114. package/dist/src/messages/responses/cache-list-remove-value.d.ts +61 -0
  115. package/dist/src/messages/responses/cache-list-remove-value.js +54 -0
  116. package/dist/src/messages/responses/cache-list-retain.d.ts +61 -0
  117. package/dist/src/messages/responses/cache-list-retain.js +54 -0
  118. package/dist/src/messages/responses/cache-set-add-element.d.ts +71 -0
  119. package/dist/src/messages/responses/cache-set-add-element.js +54 -0
  120. package/dist/src/messages/responses/cache-set-add-elements.d.ts +65 -0
  121. package/dist/src/messages/responses/cache-set-add-elements.js +61 -0
  122. package/dist/src/messages/responses/cache-set-fetch.d.ts +111 -0
  123. package/dist/src/messages/responses/cache-set-fetch.js +121 -0
  124. package/dist/src/messages/responses/cache-set-if-not-exists.d.ts +74 -0
  125. package/dist/src/messages/responses/cache-set-if-not-exists.js +63 -0
  126. package/dist/src/messages/responses/cache-set-remove-element.d.ts +61 -0
  127. package/dist/src/messages/responses/cache-set-remove-element.js +54 -0
  128. package/dist/src/messages/responses/cache-set-remove-elements.d.ts +65 -0
  129. package/dist/src/messages/responses/cache-set-remove-elements.js +61 -0
  130. package/dist/src/messages/responses/cache-set.d.ts +61 -0
  131. package/dist/src/messages/responses/cache-set.js +54 -0
  132. package/dist/src/messages/responses/cache-sorted-set-fetch.d.ts +107 -0
  133. package/dist/src/messages/responses/cache-sorted-set-fetch.js +124 -0
  134. package/dist/src/messages/responses/cache-sorted-set-get-rank.d.ts +81 -0
  135. package/dist/src/messages/responses/cache-sorted-set-get-rank.js +78 -0
  136. package/dist/src/messages/responses/cache-sorted-set-get-score.d.ts +118 -0
  137. package/dist/src/messages/responses/cache-sorted-set-get-score.js +131 -0
  138. package/dist/src/messages/responses/cache-sorted-set-get-scores.d.ts +109 -0
  139. package/dist/src/messages/responses/cache-sorted-set-get-scores.js +148 -0
  140. package/dist/src/messages/responses/cache-sorted-set-increment-score.d.ts +69 -0
  141. package/dist/src/messages/responses/cache-sorted-set-increment-score.js +68 -0
  142. package/dist/src/messages/responses/cache-sorted-set-put-element.d.ts +61 -0
  143. package/dist/src/messages/responses/cache-sorted-set-put-element.js +54 -0
  144. package/dist/src/messages/responses/cache-sorted-set-put-elements.d.ts +61 -0
  145. package/dist/src/messages/responses/cache-sorted-set-put-elements.js +54 -0
  146. package/dist/src/messages/responses/cache-sorted-set-remove-element.d.ts +61 -0
  147. package/dist/src/messages/responses/cache-sorted-set-remove-element.js +54 -0
  148. package/dist/src/messages/responses/cache-sorted-set-remove-elements.d.ts +61 -0
  149. package/dist/src/messages/responses/cache-sorted-set-remove-elements.js +54 -0
  150. package/dist/src/messages/responses/create-cache.d.ts +77 -0
  151. package/dist/src/messages/responses/create-cache.js +61 -0
  152. package/dist/src/messages/responses/create-signing-key.d.ts +71 -0
  153. package/dist/src/messages/responses/create-signing-key.js +76 -0
  154. package/dist/src/messages/responses/delete-cache.d.ts +61 -0
  155. package/dist/src/messages/responses/delete-cache.js +54 -0
  156. package/dist/src/messages/responses/generate-api-token.d.ts +50 -0
  157. package/dist/src/messages/responses/generate-api-token.js +52 -0
  158. package/dist/src/messages/responses/grpc-response-types.d.ts +41 -0
  159. package/dist/src/messages/responses/grpc-response-types.js +53 -0
  160. package/dist/src/messages/responses/list-caches.d.ts +70 -0
  161. package/dist/src/messages/responses/list-caches.js +69 -0
  162. package/dist/src/messages/responses/list-signing-keys.d.ts +68 -0
  163. package/dist/src/messages/responses/list-signing-keys.js +68 -0
  164. package/dist/src/messages/responses/response-base.d.ts +43 -0
  165. package/dist/src/messages/responses/response-base.js +50 -0
  166. package/dist/src/messages/responses/revoke-signing-key.d.ts +61 -0
  167. package/dist/src/messages/responses/revoke-signing-key.js +54 -0
  168. package/dist/src/messages/responses/topic-item.d.ts +27 -0
  169. package/dist/src/messages/responses/topic-item.js +43 -0
  170. package/dist/src/messages/responses/topic-publish.d.ts +61 -0
  171. package/dist/src/messages/responses/topic-publish.js +54 -0
  172. package/dist/src/messages/responses/topic-subscribe.d.ts +69 -0
  173. package/dist/src/messages/responses/topic-subscribe.js +72 -0
  174. package/dist/src/messages/signing-key.d.ts +9 -0
  175. package/dist/src/messages/signing-key.js +21 -0
  176. package/dist/src/utils/cache-call-options.d.ts +99 -0
  177. package/dist/src/utils/cache-call-options.js +9 -0
  178. package/dist/src/utils/collection-ttl.d.ts +78 -0
  179. package/dist/src/utils/collection-ttl.js +102 -0
  180. package/dist/src/utils/index.d.ts +3 -0
  181. package/dist/src/utils/index.js +20 -0
  182. package/dist/src/utils/topic-call-options.d.ts +19 -0
  183. package/dist/src/utils/topic-call-options.js +3 -0
  184. package/package.json +53 -0
@@ -0,0 +1,86 @@
1
+ import { SdkError } from '../../errors/errors';
2
+ import { ResponseBase } from './response-base';
3
+ /**
4
+ * Parent response type for a cache get request. The
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 CacheGet.Error) {
17
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
18
+ * // `CacheGet.Error` in this block, so you will have access to the properties
19
+ * // of the Error class; e.g. `response.errorCode()`.
20
+ * }
21
+ * ```
22
+ */
23
+ export declare abstract class Response extends ResponseBase {
24
+ }
25
+ declare class _Hit extends Response {
26
+ private readonly body;
27
+ constructor(body: Uint8Array);
28
+ /**
29
+ * Returns the data as a utf-8 string, decoded from the underlying byte array.
30
+ * @returns string
31
+ */
32
+ valueString(): string;
33
+ /**
34
+ * Returns the data as a byte array.
35
+ * @returns {Uint8Array}
36
+ */
37
+ valueUint8Array(): Uint8Array;
38
+ toString(): string;
39
+ }
40
+ declare const Hit_base: {
41
+ new (...args: any[]): {};
42
+ } & typeof _Hit;
43
+ /**
44
+ * Indicates that the requested data was successfully retrieved from the cache. Provides
45
+ * `value*` accessors to retrieve the data in the appropriate format.
46
+ */
47
+ export declare class Hit extends Hit_base {
48
+ }
49
+ declare class _Miss extends Response {
50
+ }
51
+ declare const Miss_base: {
52
+ new (...args: any[]): {
53
+ readonly is_miss: boolean;
54
+ };
55
+ } & typeof _Miss;
56
+ /**
57
+ * Indicates that the requested data was not available in the cache.
58
+ */
59
+ export declare class Miss extends Miss_base {
60
+ }
61
+ declare class _Error extends Response {
62
+ protected _innerException: SdkError;
63
+ constructor(_innerException: SdkError);
64
+ }
65
+ declare const Error_base: {
66
+ new (...args: any[]): {
67
+ _innerException: SdkError;
68
+ message(): string;
69
+ innerException(): SdkError;
70
+ errorCode(): import("../../errors/errors").MomentoErrorCode;
71
+ toString(): string;
72
+ };
73
+ } & typeof _Error;
74
+ /**
75
+ * Indicates that an error occurred during the cache get request.
76
+ *
77
+ * This response object includes the following fields that you can use to determine
78
+ * how you would like to handle the error:
79
+ *
80
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
81
+ * - `message()` - a human-readable description of the error
82
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
83
+ */
84
+ export declare class Error extends Error_base {
85
+ }
86
+ export {};
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Error = exports.Miss = exports.Hit = exports.Response = void 0;
4
+ const response_base_1 = require("./response-base");
5
+ const display_1 = require("../../internal/utils/display");
6
+ const TEXT_DECODER = new TextDecoder();
7
+ /**
8
+ * Parent response type for a cache get request. The
9
+ * response object is resolved to a type-safe object of one of
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 CacheGet.Error) {
21
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
22
+ * // `CacheGet.Error` in this block, so you will have access to the properties
23
+ * // of the Error class; e.g. `response.errorCode()`.
24
+ * }
25
+ * ```
26
+ */
27
+ class Response extends response_base_1.ResponseBase {
28
+ }
29
+ exports.Response = Response;
30
+ class _Hit extends Response {
31
+ constructor(body) {
32
+ super();
33
+ this.body = body;
34
+ }
35
+ /**
36
+ * Returns the data as a utf-8 string, decoded from the underlying byte array.
37
+ * @returns string
38
+ */
39
+ valueString() {
40
+ return TEXT_DECODER.decode(this.body);
41
+ }
42
+ /**
43
+ * Returns the data as a byte array.
44
+ * @returns {Uint8Array}
45
+ */
46
+ valueUint8Array() {
47
+ return this.body;
48
+ }
49
+ toString() {
50
+ const display = (0, display_1.truncateString)(this.valueString());
51
+ return `${super.toString()}: ${display}`;
52
+ }
53
+ }
54
+ /**
55
+ * Indicates that the requested data was successfully retrieved from the cache. Provides
56
+ * `value*` accessors to retrieve the data in the appropriate format.
57
+ */
58
+ class Hit extends (0, response_base_1.ResponseHit)(_Hit) {
59
+ }
60
+ exports.Hit = Hit;
61
+ class _Miss extends Response {
62
+ }
63
+ /**
64
+ * Indicates that the requested data was not available in the cache.
65
+ */
66
+ class Miss extends (0, response_base_1.ResponseMiss)(_Miss) {
67
+ }
68
+ exports.Miss = Miss;
69
+ class _Error extends Response {
70
+ constructor(_innerException) {
71
+ super();
72
+ this._innerException = _innerException;
73
+ }
74
+ }
75
+ /**
76
+ * Indicates that an error occurred during the cache get request.
77
+ *
78
+ * This response object includes the following fields that you can use to determine
79
+ * how you would like to handle the error:
80
+ *
81
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
82
+ * - `message()` - a human-readable description of the error
83
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
84
+ */
85
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
86
+ }
87
+ exports.Error = Error;
88
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtZ2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jYWNoZS1nZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBS3lCO0FBQ3pCLDBEQUE0RDtBQUU1RCxNQUFNLFlBQVksR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO0FBRXZDOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBbUJHO0FBQ0gsTUFBc0IsUUFBUyxTQUFRLDRCQUFZO0NBQUc7QUFBdEQsNEJBQXNEO0FBRXRELE1BQU0sSUFBSyxTQUFRLFFBQVE7SUFFekIsWUFBWSxJQUFnQjtRQUMxQixLQUFLLEVBQUUsQ0FBQztRQUNSLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO0lBQ25CLENBQUM7SUFDRDs7O09BR0c7SUFDSSxXQUFXO1FBQ2hCLE9BQU8sWUFBWSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDeEMsQ0FBQztJQUVEOzs7T0FHRztJQUNJLGVBQW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{ SdkError } from '../../errors/errors';
2
+ import { ResponseBase } from './response-base';
3
+ /**
4
+ * Parent response type for a increment request. The
5
+ * response object is resolved to a type-safe object of one of
6
+ * the following subtypes:
7
+ *
8
+ * - {Success}
9
+ * - {Error}
10
+ *
11
+ * `instanceof` type guards can be used to operate on the appropriate subtype.
12
+ * @example
13
+ * For example:
14
+ * ```
15
+ * if (response instanceof CacheIncrement.Error) {
16
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
17
+ * // `CacheIncrement.Error` in this block, so you will have access to the properties
18
+ * // of the Error class; e.g. `response.errorCode()`.
19
+ * }
20
+ * ```
21
+ */
22
+ export declare abstract class Response extends ResponseBase {
23
+ }
24
+ declare class _Success extends Response {
25
+ private readonly value;
26
+ constructor(value: number);
27
+ /**
28
+ * The new value of the element after incrementing.
29
+ * @returns {number}
30
+ */
31
+ valueNumber(): number;
32
+ toString(): string;
33
+ }
34
+ declare const Success_base: {
35
+ new (...args: any[]): {
36
+ readonly is_success: boolean;
37
+ };
38
+ } & typeof _Success;
39
+ /**
40
+ * Indicates a Successful increment request.
41
+ */
42
+ export declare class Success extends Success_base {
43
+ }
44
+ declare class _Error extends Response {
45
+ protected _innerException: SdkError;
46
+ constructor(_innerException: SdkError);
47
+ }
48
+ declare const Error_base: {
49
+ new (...args: any[]): {
50
+ _innerException: SdkError;
51
+ message(): string;
52
+ innerException(): SdkError;
53
+ errorCode(): import("../../errors/errors").MomentoErrorCode;
54
+ toString(): string;
55
+ };
56
+ } & typeof _Error;
57
+ /**
58
+ * Indicates that an error occurred during the increment request.
59
+ *
60
+ * This response object includes the following fields that you can use to determine
61
+ * how you would like to handle the error:
62
+ *
63
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
64
+ * - `message()` - a human-readable description of the error
65
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
66
+ */
67
+ export declare class Error extends Error_base {
68
+ }
69
+ export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Error = exports.Success = exports.Response = void 0;
4
+ const response_base_1 = require("./response-base");
5
+ /**
6
+ * Parent response type for a increment 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 CacheIncrement.Error) {
18
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
19
+ * // `CacheIncrement.Error` in this block, so you will have access to the properties
20
+ * // of the Error class; e.g. `response.errorCode()`.
21
+ * }
22
+ * ```
23
+ */
24
+ class Response extends response_base_1.ResponseBase {
25
+ }
26
+ exports.Response = Response;
27
+ class _Success extends Response {
28
+ constructor(value) {
29
+ super();
30
+ this.value = value;
31
+ }
32
+ /**
33
+ * The new value of the element after incrementing.
34
+ * @returns {number}
35
+ */
36
+ valueNumber() {
37
+ return this.value;
38
+ }
39
+ toString() {
40
+ return `${super.toString()}: value: ${this.valueNumber()}`;
41
+ }
42
+ }
43
+ /**
44
+ * Indicates a Successful increment request.
45
+ */
46
+ class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
47
+ }
48
+ exports.Success = Success;
49
+ class _Error extends Response {
50
+ constructor(_innerException) {
51
+ super();
52
+ this._innerException = _innerException;
53
+ }
54
+ }
55
+ /**
56
+ * Indicates that an error occurred during the increment request.
57
+ *
58
+ * This response object includes the following fields that you can use to determine
59
+ * how you would like to handle the error:
60
+ *
61
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
62
+ * - `message()` - a human-readable description of the error
63
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
64
+ */
65
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
66
+ }
67
+ exports.Error = Error;
68
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtaW5jcmVtZW50LmpzIiwic291cmNlUm9vdC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cG9uc2Ugb2JqZWN0IGluY2x1ZGVzIHRoZSBmb2xsb3dpbmcgZmllbGRzIHRoYXQgeW91IGNhbiB1c2UgdG8gZGV0ZXJtaW5lXG4gKiBob3cgeW91IHdvdWxkIGxpa2UgdG8gaGFuZGxlIHRoZSBlcnJvcjpcbiAqXG4gKiAtIGBlcnJvckNvZGUoKWAgLSBhIHVuaXF1ZSBNb21lbnRvIGVycm9yIGNvZGUgaW5kaWNhdGluZyB0aGUgdHlwZSBvZiBlcnJvciB0aGF0IG9jY3VycmVkLlxuICogLSBgbWVzc2FnZSgpYCAtIGEgaHVtYW4tcmVhZGFibGUgZGVzY3JpcHRpb24gb2YgdGhlIGVycm9yXG4gKiAtIGBpbm5lckV4Y2VwdGlvbigpYCAtIHRoZSBvcmlnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgUmVzcG9uc2VFcnJvcihfRXJyb3IpIHt9XG4iXX0=
@@ -0,0 +1,69 @@
1
+ import { IListResponseSuccess, ResponseBase } from './response-base';
2
+ import { SdkError } from '../../errors/errors';
3
+ /**
4
+ * Parent response type for a list concatenate back request. The
5
+ * response object is resolved to a type-safe object of one of
6
+ * the following subtypes:
7
+ *
8
+ * - {Success}
9
+ * - {Error}
10
+ *
11
+ * `instanceof` type guards can be used to operate on the appropriate subtype.
12
+ * @example
13
+ * For example:
14
+ * ```
15
+ * if (response instanceof 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
+ * ```
21
+ */
22
+ export declare abstract class Response extends ResponseBase {
23
+ }
24
+ declare class _Success extends Response implements IListResponseSuccess {
25
+ private readonly _list_length;
26
+ constructor(list_length: number);
27
+ /**
28
+ * Returns the new length of the list after the concatenate operation.
29
+ * @returns {number}
30
+ */
31
+ listLength(): number;
32
+ toString(): string;
33
+ }
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/errors").MomentoErrorCode;
52
+ toString(): string;
53
+ };
54
+ } & typeof _Error;
55
+ /**
56
+ * Indicates that an error occurred during the list concatenate back request.
57
+ *
58
+ * This response object includes the following fields that you can use to determine
59
+ * how you would like to handle the error:
60
+ *
61
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
62
+ * - `message()` - a human-readable description of the error
63
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
64
+ */
65
+ export declare class Error extends Error_base {
66
+ _innerException: SdkError;
67
+ constructor(_innerException: SdkError);
68
+ }
69
+ export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Error = exports.Success = exports.Response = void 0;
4
+ const response_base_1 = require("./response-base");
5
+ /**
6
+ * Parent response type for a list concatenate back 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 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
+ * ```
23
+ */
24
+ class Response extends response_base_1.ResponseBase {
25
+ }
26
+ exports.Response = Response;
27
+ class _Success extends Response {
28
+ constructor(list_length) {
29
+ super();
30
+ this._list_length = list_length;
31
+ }
32
+ /**
33
+ * Returns the new length of the list after the concatenate operation.
34
+ * @returns {number}
35
+ */
36
+ listLength() {
37
+ return this._list_length;
38
+ }
39
+ toString() {
40
+ return `${super.toString()}: listLength: ${this._list_length}`;
41
+ }
42
+ }
43
+ /**
44
+ * Indicates a Successful list concatenate back request.
45
+ */
46
+ class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
47
+ }
48
+ exports.Success = Success;
49
+ class _Error extends Response {
50
+ }
51
+ /**
52
+ * Indicates that an error occurred during the list concatenate back request.
53
+ *
54
+ * This response object includes the following fields that you can use to determine
55
+ * how you would like to handle the error:
56
+ *
57
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
58
+ * - `message()` - a human-readable description of the error
59
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
60
+ */
61
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
62
+ constructor(_innerException) {
63
+ super();
64
+ this._innerException = _innerException;
65
+ }
66
+ }
67
+ exports.Error = Error;
68
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtbGlzdC1jb25jYXRlbmF0ZS1iYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jYWNoZS1saXN0LWNvbmNhdGVuYXRlLWJhY2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbURBS3lCO0FBR3pCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQkc7QUFDSCxNQUFzQixRQUFTLFNBQVEsNEJBQVk7Q0FBRztBQUF0RCw0QkFBc0Q7QUFFdEQsTUFBTSxRQUFTLFNBQVEsUUFBUTtJQUU3QixZQUFZLFdBQW1CO1FBQzdCLEtBQUssRUFBRSxDQUFDO1FBQ1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ZSBlcnJvclxuICogLSBgaW5uZXJFeGNlcHRpb24oKWAgLSB0aGUgb3JpZ2luYWwgZXJyb3IgdGhhdCBjYXVzZWQgdGhlIGZhaWx1cmU7IGNhbiBiZSByZS10aHJvd24uXG4gKi9cbmV4cG9ydCBjbGFzcyBFcnJvciBleHRlbmRzIFJlc3BvbnNlRXJyb3IoX0Vycm9yKSB7XG4gIGNvbnN0cnVjdG9yKHB1YmxpYyBfaW5uZXJFeGNlcHRpb246IFNka0Vycm9yKSB7XG4gICAgc3VwZXIoKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,69 @@
1
+ import { IListResponseSuccess, ResponseBase } from './response-base';
2
+ import { SdkError } from '../../errors/errors';
3
+ /**
4
+ * Parent response type for a list concatenate front request. The
5
+ * response object is resolved to a type-safe object of one of
6
+ * the following subtypes:
7
+ *
8
+ * - {Success}
9
+ * - {Error}
10
+ *
11
+ * `instanceof` type guards can be used to operate on the appropriate subtype.
12
+ * @example
13
+ * For example:
14
+ * ```
15
+ * if (response instanceof 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
+ * ```
21
+ */
22
+ export declare abstract class Response extends ResponseBase {
23
+ }
24
+ declare class _Success extends Response implements IListResponseSuccess {
25
+ private readonly _list_length;
26
+ constructor(list_length: number);
27
+ /**
28
+ * Returns the new length of the list after the concatenate operation.
29
+ * @returns {number}
30
+ */
31
+ listLength(): number;
32
+ toString(): string;
33
+ }
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/errors").MomentoErrorCode;
52
+ toString(): string;
53
+ };
54
+ } & typeof _Error;
55
+ /**
56
+ * Indicates that an error occurred during the list concatenate front request.
57
+ *
58
+ * This response object includes the following fields that you can use to determine
59
+ * how you would like to handle the error:
60
+ *
61
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
62
+ * - `message()` - a human-readable description of the error
63
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
64
+ */
65
+ export declare class Error extends Error_base {
66
+ _innerException: SdkError;
67
+ constructor(_innerException: SdkError);
68
+ }
69
+ export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Error = exports.Success = exports.Response = void 0;
4
+ const response_base_1 = require("./response-base");
5
+ /**
6
+ * Parent response type for a list concatenate front 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 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
+ * ```
23
+ */
24
+ class Response extends response_base_1.ResponseBase {
25
+ }
26
+ exports.Response = Response;
27
+ class _Success extends Response {
28
+ constructor(list_length) {
29
+ super();
30
+ this._list_length = list_length;
31
+ }
32
+ /**
33
+ * Returns the new length of the list after the concatenate operation.
34
+ * @returns {number}
35
+ */
36
+ listLength() {
37
+ return this._list_length;
38
+ }
39
+ toString() {
40
+ return `${super.toString()}: listLength: ${this._list_length}`;
41
+ }
42
+ }
43
+ /**
44
+ * Indicates a Successful list concatenate front request.
45
+ */
46
+ class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
47
+ }
48
+ exports.Success = Success;
49
+ class _Error extends Response {
50
+ }
51
+ /**
52
+ * Indicates that an error occurred during the list concatenate front request.
53
+ *
54
+ * This response object includes the following fields that you can use to determine
55
+ * how you would like to handle the error:
56
+ *
57
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
58
+ * - `message()` - a human-readable description of the error
59
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
60
+ */
61
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
62
+ constructor(_innerException) {
63
+ super();
64
+ this._innerException = _innerException;
65
+ }
66
+ }
67
+ exports.Error = Error;
68
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtbGlzdC1jb25jYXRlbmF0ZS1mcm9udC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtbGlzdC1jb25jYXRlbmF0ZS1mcm9udC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFLeUI7QUFHekI7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCRztBQUNILE1BQXNCLFFBQVMsU0FBUSw0QkFBWTtDQUFHO0FBQXRELDRCQUFzRDtBQUV0RCxNQUFNLFFBQVMsU0FBUSxRQUFRO0lBRTdCLFlBQVksV0FBbUI7UUFDN0IsS0FBSyxFQUFFLENBQUM7UUFDUixJQUFJLENBQUMsWUFBWSxHQUFHLFdBQVcsQ0FBQztJQUNsQyxDQUFDO0lBRUQ7OztPQUdHO0lBQ0ksVUFBVTtRQUNmLE9BQU8sSUFBSSxDQUFDLFlBQVksQ0FBQztJQUMzQixDQUFDO0lBRWUsUUFBUTtRQUN0QixPQUFPLEdBQUcsS0FBSyxDQUFDLFFBQVEsRUFBRSxpQkFBaUIsSUFBSSxDQUFDLFlBQVksRUFBRSxDQUFDO0lBQ2pFLENBQUM7Q0FDRjtBQ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