@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,71 @@
1
+ import { SdkError } from '../../errors/errors';
2
+ import { ResponseBase } from './response-base';
3
+ /**
4
+ * Parent response type for a set add element 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 CacheSetAddElement.Error) {
16
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
17
+ * // `CacheSetAddElement.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
+ }
26
+ declare const Success_base: {
27
+ new (...args: any[]): {
28
+ readonly is_success: boolean;
29
+ };
30
+ } & typeof _Success;
31
+ /**
32
+ * Indicates a Successful set add element request.
33
+ */
34
+ export declare class Success extends Success_base {
35
+ }
36
+ declare class _Error extends Response {
37
+ protected _innerException: SdkError;
38
+ constructor(_innerException: SdkError);
39
+ }
40
+ declare const Error_base: {
41
+ new (...args: any[]): {
42
+ _innerException: SdkError;
43
+ message(): string;
44
+ /**
45
+ * Indicates that an error occurred during the set add element request.
46
+ *
47
+ * This response object includes the following fields that you can use to determine
48
+ * how you would like to handle the error:
49
+ *
50
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
51
+ * - `message()` - a human-readable description of the error
52
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
53
+ */
54
+ innerException(): SdkError;
55
+ errorCode(): import("../../errors/errors").MomentoErrorCode;
56
+ toString(): string;
57
+ };
58
+ } & typeof _Error;
59
+ /**
60
+ * Indicates that an error occurred during the set add element request.
61
+ *
62
+ * This response object includes the following fields that you can use to determine
63
+ * how you would like to handle the error:
64
+ *
65
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
66
+ * - `message()` - a human-readable description of the error
67
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
68
+ */
69
+ export declare class Error extends Error_base {
70
+ }
71
+ export {};
@@ -0,0 +1,54 @@
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 set add 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 CacheSetAddElement.Error) {
18
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
19
+ * // `CacheSetAddElement.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 set add element request.
31
+ */
32
+ class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
33
+ }
34
+ exports.Success = Success;
35
+ class _Error extends Response {
36
+ constructor(_innerException) {
37
+ super();
38
+ this._innerException = _innerException;
39
+ }
40
+ }
41
+ /**
42
+ * Indicates that an error occurred during the set add element request.
43
+ *
44
+ * This response object includes the following fields that you can use to determine
45
+ * how you would like to handle the error:
46
+ *
47
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
48
+ * - `message()` - a human-readable description of the error
49
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
50
+ */
51
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
52
+ }
53
+ exports.Error = Error;
54
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc2V0LWFkZC1lbGVtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jYWNoZS1zZXQtYWRkLWVsZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBQTZFO0FBRTdFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQkc7QUFDSCxNQUFzQixRQUFTLFNBQVEsNEJBQVk7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taW5lXG4gKiBob3cgeW91IHdvdWxkIGxpa2UgdG8gaGFuZGxlIHRoZSBlcnJvcjpcbiAqXG4gKiAtIGBlcnJvckNvZGUoKWAgLSBhIHVuaXF1ZSBNb21lbnRvIGVycm9yIGNvZGUgaW5kaWNhdGluZyB0aGUgdHlwZSBvZiBlcnJvciB0aGF0IG9jY3VycmVkLlxuICogLSBgbWVzc2FnZSgpYCAtIGEgaHVtYW4tcmVhZGFibGUgZGVzY3JpcHRpb24gb2YgdGhlIGVycm9yXG4gKiAtIGBpbm5lckV4Y2VwdGlvbigpYCAtIHRoZSBvcmlnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgUmVzcG9uc2VFcnJvcihfRXJyb3IpIHt9XG4iXX0=
@@ -0,0 +1,65 @@
1
+ import { ResponseBase } from './response-base';
2
+ import { SdkError } from '../../errors/errors';
3
+ import * as CacheSetAddElement from './cache-set-add-element';
4
+ /**
5
+ * Parent response type for a set add elements request. The
6
+ * response object is resolved to a type-safe object of one of
7
+ * the following subtypes:
8
+ *
9
+ * - {Success}
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 CacheSetAddElements.Error) {
17
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
18
+ * // `CacheSetAddElements.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
+ abstract toSingularResponse(): CacheSetAddElement.Response;
25
+ }
26
+ declare class _Success extends Response {
27
+ toSingularResponse(): CacheSetAddElement.Response;
28
+ }
29
+ declare const Success_base: {
30
+ new (...args: any[]): {
31
+ readonly is_success: boolean;
32
+ };
33
+ } & typeof _Success;
34
+ /**
35
+ * Indicates a Successful set add elements request.
36
+ */
37
+ export declare class Success extends Success_base {
38
+ }
39
+ declare class _Error extends Response {
40
+ _innerException: SdkError;
41
+ constructor(_innerException: SdkError);
42
+ toSingularResponse(): CacheSetAddElement.Response;
43
+ }
44
+ declare const Error_base: {
45
+ new (...args: any[]): {
46
+ _innerException: SdkError;
47
+ message(): string;
48
+ innerException(): SdkError;
49
+ errorCode(): import("../../errors/errors").MomentoErrorCode;
50
+ toString(): string;
51
+ };
52
+ } & typeof _Error;
53
+ /**
54
+ * Indicates that an error occurred during the set add elements request.
55
+ *
56
+ * This response object includes the following fields that you can use to determine
57
+ * how you would like to handle the error:
58
+ *
59
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
60
+ * - `message()` - a human-readable description of the error
61
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
62
+ */
63
+ export declare class Error extends Error_base {
64
+ }
65
+ export {};
@@ -0,0 +1,61 @@
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
+ const CacheSetAddElement = require("./cache-set-add-element");
6
+ /**
7
+ * Parent response type for a set add elements request. The
8
+ * response object is resolved to a type-safe object of one of
9
+ * the following subtypes:
10
+ *
11
+ * - {Success}
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 CacheSetAddElements.Error) {
19
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
20
+ * // `CacheSetAddElements.Error` in this block, so you will have access to the properties
21
+ * // of the Error class; e.g. `response.errorCode()`.
22
+ * }
23
+ * ```
24
+ */
25
+ class Response extends response_base_1.ResponseBase {
26
+ }
27
+ exports.Response = Response;
28
+ class _Success extends Response {
29
+ toSingularResponse() {
30
+ return new CacheSetAddElement.Success();
31
+ }
32
+ }
33
+ /**
34
+ * Indicates a Successful set add elements request.
35
+ */
36
+ class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
37
+ }
38
+ exports.Success = Success;
39
+ class _Error extends Response {
40
+ constructor(_innerException) {
41
+ super();
42
+ this._innerException = _innerException;
43
+ }
44
+ toSingularResponse() {
45
+ return new CacheSetAddElement.Error(this._innerException);
46
+ }
47
+ }
48
+ /**
49
+ * Indicates that an error occurred during the set add elements request.
50
+ *
51
+ * This response object includes the following fields that you can use to determine
52
+ * how you would like to handle the error:
53
+ *
54
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
55
+ * - `message()` - a human-readable description of the error
56
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
57
+ */
58
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
59
+ }
60
+ exports.Error = Error;
61
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc2V0LWFkZC1lbGVtZW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvY2FjaGUtc2V0LWFkZC1lbGVtZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFBNkU7QUFFN0UsOERBQThEO0FBRTlEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQkc7QUFDSCxNQUFzQixRQUFTLFNBQVEsNEJBQVk7Q0FFbEQ7QUFGRCw0QkFFQztBQUVELE1BQU0sUUFBUyxTQUFRLFFBQVE7SUFDN0Isa0JBQWtCO1FBQ2hCLE9BQU8sSUFBSSxrQkFBa0IsQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUMxQyxDQUFDO0NBQ0Y7QUFFRDs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLElBQUEsK0JBQWUsRUFBQyxRQUFRLENBQUM7Q0FBRztBQUF6RCwwQkFBeUQ7QUFFekQsTUFBTSxNQUFPLFNBQVEsUU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G5cbiAgdG9TaW5ndWxhclJlc3BvbnNlKCk6IENhY2hlU2V0QWRkRWxlbWVudC5SZXNwb25zZSB7XG4gICAgcmV0dXJuIG5ldyBDYWNoZVNldEFkZEVsZW1lbnQuRXJyb3IodGhpcy5faW5uZXJFeGNlcHRpb24pO1xuICB9XG59XG5cbi8qKlxuICogSW5kaWNhdGVzIHRoYXQgYW4gZXJyb3Igb2NjdXJyZWQgZHVyaW5nIHRoZSBzZXQgYWRkIGVsZW1lbnRzIHJlcXVlc3QuXG4gKlxuICogVGhpcyByZXNwb25zZSBvYmplY3QgaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBmaWVsZHMgdGhhdCB5b3UgY2FuIHVzZSB0byBkZXRlcm1pbmVcbiAqIGhvdyB5b3Ugd291bGQgbGlrZSB0byBoYW5kbGUgdGhlIGVycm9yOlxuICpcbiAqIC0gYGVycm9yQ29kZSgpYCAtIGEgdW5pcXVlIE1vbWVudG8gZXJyb3IgY29kZSBpbmRpY2F0aW5nIHRoZSB0eXBlIG9mIGVycm9yIHRoYXQgb2NjdXJyZWQuXG4gKiAtIGBtZXNzYWdlKClgIC0gYSBodW1hbi1yZWFkYWJsZSBkZXNjcmlwdGlvbiBvZiB0aGUgZXJyb3JcbiAqIC0gYGlubmVyRXhjZXB0aW9uKClgIC0gdGhlIG9yaWdpbmFsIGVycm9yIHRoYXQgY2F1c2VkIHRoZSBmYWlsdXJlOyBjYW4gYmUgcmUtdGhyb3duLlxuICovXG5leHBvcnQgY2xhc3MgRXJyb3IgZXh0ZW5kcyBSZXNwb25zZUVycm9yKF9FcnJvcikge31cbiJdfQ==
@@ -0,0 +1,111 @@
1
+ import { ResponseBase } from './response-base';
2
+ import { SdkError } from '../../errors/errors';
3
+ /**
4
+ * Parent response type for a set fetch 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 CacheSetFetch.Error) {
17
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
18
+ * // `CacheSetFetch.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 elements;
27
+ constructor(elements: Uint8Array[]);
28
+ /**
29
+ * Returns the data as a Set whose values are utf-8 strings, decoded from the underlying byte arrays. This
30
+ * is a convenience alias for {valueSetString}.
31
+ * @returns {Set<string>}
32
+ */
33
+ valueSet(): Set<string>;
34
+ /**
35
+ * Returns the data as a Set whose values are utf-8 strings, decoded from the underlying byte arrays.
36
+ * @returns {Set<string>}
37
+ */
38
+ valueSetString(): Set<string>;
39
+ /**
40
+ * Returns the data as a Set whose values are byte arrays.
41
+ * @returns {Set<Uint8Array>}
42
+ */
43
+ valueSetUint8Array(): Set<Uint8Array>;
44
+ /**
45
+ * Returns the data as an Array whose values are utf-8 strings, decoded from the underlying byte arrays.
46
+ * This accessor is provided because Arrays are sometimes easier to work with in TypeScript/JavaScript than Sets are.
47
+ * This is a convenience alias for {valueArrayString}.
48
+ * @returns {string[]}
49
+ */
50
+ valueArray(): string[];
51
+ /**
52
+ * Returns the data as an Array whose values are utf-8 strings, decoded from the underlying byte arrays.
53
+ * This accessor is provided because Arrays are sometimes easier to work with in TypeScript/JavaScript than Sets are.
54
+ * @returns {string[]}
55
+ */
56
+ valueArrayString(): string[];
57
+ /**
58
+ * Returns the data as an Array whose values are byte arrays.
59
+ * This accessor is provided because Arrays are sometimes easier to work with in TypeScript/JavaScript than Sets are.
60
+ * @returns {Uint8Array[]}
61
+ */
62
+ valueArrayUint8Array(): Uint8Array[];
63
+ toString(): string;
64
+ }
65
+ declare const Hit_base: {
66
+ new (...args: any[]): {};
67
+ } & typeof _Hit;
68
+ /**
69
+ * Indicates that the requested data was successfully retrieved from the cache. Provides
70
+ * `value*` accessors to retrieve the data in the appropriate format.
71
+ */
72
+ export declare class Hit extends Hit_base {
73
+ }
74
+ declare class _Miss extends Response {
75
+ }
76
+ declare const Miss_base: {
77
+ new (...args: any[]): {
78
+ readonly is_miss: boolean;
79
+ };
80
+ } & typeof _Miss;
81
+ /**
82
+ * Indicates that the requested data was not available in the cache.
83
+ */
84
+ export declare class Miss extends Miss_base {
85
+ }
86
+ declare class _Error extends Response {
87
+ _innerException: SdkError;
88
+ constructor(_innerException: SdkError);
89
+ }
90
+ declare const Error_base: {
91
+ new (...args: any[]): {
92
+ _innerException: SdkError;
93
+ message(): string;
94
+ innerException(): SdkError;
95
+ errorCode(): import("../../errors/errors").MomentoErrorCode;
96
+ toString(): string;
97
+ };
98
+ } & typeof _Error;
99
+ /**
100
+ * Indicates that an error occurred during the set fetch request.
101
+ *
102
+ * This response object includes the following fields that you can use to determine
103
+ * how you would like to handle the error:
104
+ *
105
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
106
+ * - `message()` - a human-readable description of the error
107
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
108
+ */
109
+ export declare class Error extends Error_base {
110
+ }
111
+ export {};
@@ -0,0 +1,121 @@
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 set fetch 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 CacheSetFetch.Error) {
21
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
22
+ * // `CacheSetFetch.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(elements) {
32
+ super();
33
+ this.elements = elements;
34
+ }
35
+ /**
36
+ * Returns the data as a Set whose values are utf-8 strings, decoded from the underlying byte arrays. This
37
+ * is a convenience alias for {valueSetString}.
38
+ * @returns {Set<string>}
39
+ */
40
+ valueSet() {
41
+ return this.valueSetString();
42
+ }
43
+ /**
44
+ * Returns the data as a Set whose values are utf-8 strings, decoded from the underlying byte arrays.
45
+ * @returns {Set<string>}
46
+ */
47
+ valueSetString() {
48
+ return new Set(this.elements.map(e => TEXT_DECODER.decode(e)));
49
+ }
50
+ /**
51
+ * Returns the data as a Set whose values are byte arrays.
52
+ * @returns {Set<Uint8Array>}
53
+ */
54
+ valueSetUint8Array() {
55
+ return new Set(this.elements);
56
+ }
57
+ /**
58
+ * Returns the data as an Array whose values are utf-8 strings, decoded from the underlying byte arrays.
59
+ * This accessor is provided because Arrays are sometimes easier to work with in TypeScript/JavaScript than Sets are.
60
+ * This is a convenience alias for {valueArrayString}.
61
+ * @returns {string[]}
62
+ */
63
+ valueArray() {
64
+ return this.valueArrayString();
65
+ }
66
+ /**
67
+ * Returns the data as an Array whose values are utf-8 strings, decoded from the underlying byte arrays.
68
+ * This accessor is provided because Arrays are sometimes easier to work with in TypeScript/JavaScript than Sets are.
69
+ * @returns {string[]}
70
+ */
71
+ valueArrayString() {
72
+ return this.elements.map(e => TEXT_DECODER.decode(e));
73
+ }
74
+ /**
75
+ * Returns the data as an Array whose values are byte arrays.
76
+ * This accessor is provided because Arrays are sometimes easier to work with in TypeScript/JavaScript than Sets are.
77
+ * @returns {Uint8Array[]}
78
+ */
79
+ valueArrayUint8Array() {
80
+ return this.elements;
81
+ }
82
+ toString() {
83
+ const truncatedStringArray = (0, display_1.truncateStringArray)(Array.from(this.valueSetString()));
84
+ return `${super.toString()}: [${truncatedStringArray.toString()}]`;
85
+ }
86
+ }
87
+ /**
88
+ * Indicates that the requested data was successfully retrieved from the cache. Provides
89
+ * `value*` accessors to retrieve the data in the appropriate format.
90
+ */
91
+ class Hit extends (0, response_base_1.ResponseHit)(_Hit) {
92
+ }
93
+ exports.Hit = Hit;
94
+ class _Miss extends Response {
95
+ }
96
+ /**
97
+ * Indicates that the requested data was not available in the cache.
98
+ */
99
+ class Miss extends (0, response_base_1.ResponseMiss)(_Miss) {
100
+ }
101
+ exports.Miss = Miss;
102
+ class _Error extends Response {
103
+ constructor(_innerException) {
104
+ super();
105
+ this._innerException = _innerException;
106
+ }
107
+ }
108
+ /**
109
+ * Indicates that an error occurred during the set fetch request.
110
+ *
111
+ * This response object includes the following fields that you can use to determine
112
+ * how you would like to handle the error:
113
+ *
114
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
115
+ * - `message()` - a human-readable description of the error
116
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
117
+ */
118
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
119
+ }
120
+ exports.Error = Error;
121
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc2V0LWZldGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21lc3NhZ2VzL3Jlc3BvbnNlcy9jYWNoZS1zZXQtZmV0Y2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbURBS3lCO0FBRXpCLDBEQUFpRTtBQUVqRSxNQUFNLFlBQVksR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO0FBRXZDOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBbUJHO0FBQ0gsTUFBc0IsUUFBUyxTQUFRLDRCQUFZO0NBQUc7QUFBdEQsNEJBQXNEO0FBRXRELE1BQU0sSUFBSyxTQUFRLF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Y2hlLlxuICovXG5leHBvcnQgY2xhc3MgTWlzcyBleHRlbmRzIFJlc3BvbnNlTWlzcyhfTWlzcykge31cblxuY2xhc3MgX0Vycm9yIGV4dGVuZHMgUmVzcG9uc2Uge1xuICBjb25zdHJ1Y3RvcihwdWJsaWMgX2lubmVyRXhjZXB0aW9uOiBTZGtFcnJvcikge1xuICAgIHN1cGVyKCk7XG4gIH1cbn1cblxuLyoqXG4gKiBJbmRpY2F0ZXMgdGhhdCBhbiBlcnJvciBvY2N1cnJlZCBkdXJpbmcgdGhlIHNldCBmZXRjaCByZXF1ZXN0LlxuICpcbiAqIFRoaXMgcmVzcG9uc2Ugb2JqZWN0IGluY2x1ZGVzIHRoZSBmb2xsb3dpbmcgZmllbGRzIHRoYXQgeW91IGNhbiB1c2UgdG8gZGV0ZXJtaW5lXG4gKiBob3cgeW91IHdvdWxkIGxpa2UgdG8gaGFuZGxlIHRoZSBlcnJvcjpcbiAqXG4gKiAtIGBlcnJvckNvZGUoKWAgLSBhIHVuaXF1ZSBNb21lbnRvIGVycm9yIGNvZGUgaW5kaWNhdGluZyB0aGUgdHlwZSBvZiBlcnJvciB0aGF0IG9jY3VycmVkLlxuICogLSBgbWVzc2FnZSgpYCAtIGEgaHVtYW4tcmVhZGFibGUgZGVzY3JpcHRpb24gb2YgdGhlIGVycm9yXG4gKiAtIGBpbm5lckV4Y2VwdGlvbigpYCAtIHRoZSBvcmlnaW5hbCBlcnJvciB0aGF0IGNhdXNlZCB0aGUgZmFpbHVyZTsgY2FuIGJlIHJlLXRocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgUmVzcG9uc2VFcnJvcihfRXJyb3IpIHt9XG4iXX0=
@@ -0,0 +1,74 @@
1
+ import { SdkError } from '../../errors/errors';
2
+ import { ResponseBase } from './response-base';
3
+ /**
4
+ * Parent response type for a cache setIfNotExists request. The
5
+ * response object is resolved to a type-safe object of one of
6
+ * the following subtypes:
7
+ *
8
+ * - {Stored}
9
+ * - {NotStored}
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 CacheSetIfNotExists.Error) {
17
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
18
+ * // `CacheSetIfNotExists.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 _Stored extends Response {
26
+ }
27
+ declare const Stored_base: {
28
+ new (...args: any[]): {
29
+ readonly is_success: boolean;
30
+ };
31
+ } & typeof _Stored;
32
+ /**
33
+ * Indicates the key did not exist and the value was set.
34
+ */
35
+ export declare class Stored extends Stored_base {
36
+ }
37
+ declare class _NotStored extends Response {
38
+ }
39
+ declare const NotStored_base: {
40
+ new (...args: any[]): {
41
+ readonly is_success: boolean;
42
+ };
43
+ } & typeof _NotStored;
44
+ /**
45
+ * Indicates the key existed and no value was set.
46
+ */
47
+ export declare class NotStored extends NotStored_base {
48
+ }
49
+ declare class _Error extends Response {
50
+ protected _innerException: SdkError;
51
+ constructor(_innerException: SdkError);
52
+ }
53
+ declare const Error_base: {
54
+ new (...args: any[]): {
55
+ _innerException: SdkError;
56
+ message(): string;
57
+ innerException(): SdkError;
58
+ errorCode(): import("../../errors/errors").MomentoErrorCode;
59
+ toString(): string;
60
+ };
61
+ } & typeof _Error;
62
+ /**
63
+ * Indicates that an error occurred during the cache setIfNotExists request.
64
+ *
65
+ * This response object includes the following fields that you can use to determine
66
+ * how you would like to handle the error:
67
+ *
68
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
69
+ * - `message()` - a human-readable description of the error
70
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
71
+ */
72
+ export declare class Error extends Error_base {
73
+ }
74
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Error = exports.NotStored = exports.Stored = exports.Response = void 0;
4
+ const response_base_1 = require("./response-base");
5
+ /**
6
+ * Parent response type for a cache setIfNotExists request. The
7
+ * response object is resolved to a type-safe object of one of
8
+ * the following subtypes:
9
+ *
10
+ * - {Stored}
11
+ * - {NotStored}
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 CacheSetIfNotExists.Error) {
19
+ * // Handle error as appropriate. The compiler will smart-cast `response` to type
20
+ * // `CacheSetIfNotExists.Error` in this block, so you will have access to the properties
21
+ * // of the Error class; e.g. `response.errorCode()`.
22
+ * }
23
+ * ```
24
+ */
25
+ class Response extends response_base_1.ResponseBase {
26
+ }
27
+ exports.Response = Response;
28
+ class _Stored extends Response {
29
+ }
30
+ /**
31
+ * Indicates the key did not exist and the value was set.
32
+ */
33
+ class Stored extends (0, response_base_1.ResponseSuccess)(_Stored) {
34
+ }
35
+ exports.Stored = Stored;
36
+ class _NotStored extends Response {
37
+ }
38
+ /**
39
+ * Indicates the key existed and no value was set.
40
+ */
41
+ class NotStored extends (0, response_base_1.ResponseSuccess)(_NotStored) {
42
+ }
43
+ exports.NotStored = NotStored;
44
+ class _Error extends Response {
45
+ constructor(_innerException) {
46
+ super();
47
+ this._innerException = _innerException;
48
+ }
49
+ }
50
+ /**
51
+ * Indicates that an error occurred during the cache setIfNotExists request.
52
+ *
53
+ * This response object includes the following fields that you can use to determine
54
+ * how you would like to handle the error:
55
+ *
56
+ * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
57
+ * - `message()` - a human-readable description of the error
58
+ * - `innerException()` - the original error that caused the failure; can be re-thrown.
59
+ */
60
+ class Error extends (0, response_base_1.ResponseError)(_Error) {
61
+ }
62
+ exports.Error = Error;
63
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtc2V0LWlmLW5vdC1leGlzdHMuan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