@gomomento/sdk-core 1.93.0 → 1.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/clients/ICacheClient.d.ts +3 -1
- package/dist/src/clients/ICacheClient.js +1 -1
- package/dist/src/clients/IMomentoCache.d.ts +3 -1
- package/dist/src/clients/IMomentoCache.js +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +7 -3
- package/dist/src/internal/clients/cache/AbstractCacheClient.d.ts +25 -1
- package/dist/src/internal/clients/cache/AbstractCacheClient.js +31 -1
- package/dist/src/internal/clients/cache/IDataClient.d.ts +3 -1
- package/dist/src/internal/clients/cache/IDataClient.js +1 -1
- package/dist/src/internal/clients/cache/momento-cache.d.ts +3 -1
- package/dist/src/internal/clients/cache/momento-cache.js +7 -1
- package/dist/src/internal/clients/pubsub/AbstractPubsubClient.d.ts +17 -15
- package/dist/src/internal/clients/pubsub/AbstractPubsubClient.js +47 -26
- package/dist/src/internal/clients/pubsub/IPubsubClient.d.ts +0 -1
- package/dist/src/internal/clients/pubsub/IPubsubClient.js +1 -1
- package/dist/src/internal/subscription-state.d.ts +1 -0
- package/dist/src/internal/subscription-state.js +7 -1
- package/dist/src/internal/utils/validators.d.ts +1 -0
- package/dist/src/internal/utils/validators.js +8 -2
- package/dist/src/messages/responses/cache-set-length.d.ts +46 -0
- package/dist/src/messages/responses/cache-set-length.js +60 -0
- package/dist/src/messages/responses/cache-set-pop.d.ts +83 -0
- package/dist/src/messages/responses/cache-set-pop.js +113 -0
- package/dist/src/messages/responses/enums/cache/set/index.d.ts +10 -0
- package/dist/src/messages/responses/enums/cache/set/index.js +14 -2
- package/dist/src/messages/responses/enums/index.d.ts +1 -0
- package/dist/src/messages/responses/enums/index.js +2 -1
- package/dist/src/messages/responses/enums/webhook/index.d.ts +20 -0
- package/dist/src/messages/responses/enums/webhook/index.js +29 -0
- package/dist/src/messages/responses/topic-subscribe.d.ts +3 -1
- package/dist/src/messages/responses/topic-subscribe.js +4 -2
- package/dist/src/messages/responses/webhook/delete-webhook.d.ts +10 -43
- package/dist/src/messages/responses/webhook/delete-webhook.js +13 -34
- package/dist/src/messages/responses/webhook/get-webhook-secret.d.ts +14 -46
- package/dist/src/messages/responses/webhook/get-webhook-secret.js +14 -35
- package/dist/src/messages/responses/webhook/list-webhooks.d.ts +12 -45
- package/dist/src/messages/responses/webhook/list-webhooks.js +11 -35
- package/dist/src/messages/responses/webhook/put-webhook.d.ts +12 -45
- package/dist/src/messages/responses/webhook/put-webhook.js +11 -35
- package/dist/src/messages/responses/webhook/rotate-webhook-secret.d.ts +14 -46
- package/dist/src/messages/responses/webhook/rotate-webhook-secret.js +14 -35
- package/package.json +1 -1
@@ -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 DeleteWebhook.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `DeleteWebhook.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 { DeleteWebhookResponse } from '../enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: DeleteWebhookResponse;
|
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 delete webhook 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 = DeleteWebhookResponse.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 delete webhook request.
|
51
15
|
*
|
@@ -56,6 +20,9 @@ declare const Error_base: {
|
|
56
20
|
* - `message()` - a human-readable description of the error
|
57
21
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
58
22
|
*/
|
59
|
-
export declare class Error extends
|
23
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
24
|
+
readonly type: DeleteWebhookResponse.Error;
|
25
|
+
constructor(_innerException: SdkError);
|
60
26
|
}
|
27
|
+
export type Response = Success | Error;
|
61
28
|
export {};
|
@@ -1,43 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Error = exports.Success =
|
3
|
+
exports.Error = exports.Success = void 0;
|
4
4
|
const response_base_1 = require("../response-base");
|
5
|
-
|
6
|
-
* Parent response type for a delete webhook 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 DeleteWebhook.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `DeleteWebhook.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 delete webhook 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.DeleteWebhookResponse.Success;
|
39
13
|
}
|
40
14
|
}
|
15
|
+
exports.Success = Success;
|
41
16
|
/**
|
42
17
|
* Indicates that an error occurred during the delete webhook 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.DeleteWebhookResponse.Error;
|
30
|
+
}
|
52
31
|
}
|
53
32
|
exports.Error = Error;
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZXRlLXdlYmhvb2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL3dlYmhvb2sv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-
|
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 GetWebhookSecret.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `GetWebhookSecret.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 { GetWebhookSecretResponse } from '../enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: GetWebhookSecretResponse;
|
23
6
|
}
|
24
7
|
type Props = {
|
25
8
|
secret: string;
|
26
9
|
cacheName: string;
|
27
10
|
webhookName: string;
|
28
11
|
};
|
29
|
-
|
12
|
+
/**
|
13
|
+
* Indicates a Successful GetWebhookSecret request.
|
14
|
+
*/
|
15
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
16
|
+
readonly type: GetWebhookSecretResponse.Success;
|
30
17
|
private readonly _secret;
|
31
18
|
private readonly _webhookName;
|
32
19
|
private readonly _cacheName;
|
@@ -34,30 +21,8 @@ declare class _Success extends Response {
|
|
34
21
|
secret(): string;
|
35
22
|
webhookName(): string;
|
36
23
|
cacheName(): string;
|
24
|
+
toString(): string;
|
37
25
|
}
|
38
|
-
declare const Success_base: {
|
39
|
-
new (...args: any[]): {
|
40
|
-
readonly is_success: boolean;
|
41
|
-
};
|
42
|
-
} & typeof _Success;
|
43
|
-
/**
|
44
|
-
* Indicates a Successful GetWebhookSecret request.
|
45
|
-
*/
|
46
|
-
export declare class Success extends Success_base {
|
47
|
-
}
|
48
|
-
declare class _Error extends Response {
|
49
|
-
protected _innerException: SdkError;
|
50
|
-
constructor(_innerException: SdkError);
|
51
|
-
}
|
52
|
-
declare const Error_base: {
|
53
|
-
new (...args: any[]): {
|
54
|
-
_innerException: SdkError;
|
55
|
-
message(): string;
|
56
|
-
innerException(): SdkError;
|
57
|
-
errorCode(): import("../../../errors").MomentoErrorCode;
|
58
|
-
toString(): string;
|
59
|
-
};
|
60
|
-
} & typeof _Error;
|
61
26
|
/**
|
62
27
|
* Indicates that an error occurred during the GetWebhookSecret request.
|
63
28
|
*
|
@@ -68,6 +33,9 @@ declare const Error_base: {
|
|
68
33
|
* - `message()` - a human-readable description of the error
|
69
34
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
70
35
|
*/
|
71
|
-
export declare class Error extends
|
36
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
37
|
+
readonly type: GetWebhookSecretResponse.Error;
|
38
|
+
constructor(_innerException: SdkError);
|
72
39
|
}
|
40
|
+
export type Response = Success | Error;
|
73
41
|
export {};
|
@@ -1,32 +1,15 @@
|
|
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 GetWebhookSecret.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `GetWebhookSecret.Error` in this block, so you will have access to the properties
|
20
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
21
|
-
* }
|
22
|
-
* ```
|
7
|
+
* Indicates a Successful GetWebhookSecret request.
|
23
8
|
*/
|
24
|
-
class
|
25
|
-
}
|
26
|
-
exports.Response = Response;
|
27
|
-
class _Success extends Response {
|
9
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
28
10
|
constructor(props) {
|
29
11
|
super();
|
12
|
+
this.type = enums_1.GetWebhookSecretResponse.Success;
|
30
13
|
this._secret = props.secret;
|
31
14
|
this._cacheName = props.cacheName;
|
32
15
|
this._webhookName = props.webhookName;
|
@@ -40,19 +23,11 @@ class _Success extends Response {
|
|
40
23
|
cacheName() {
|
41
24
|
return this._cacheName;
|
42
25
|
}
|
43
|
-
|
44
|
-
|
45
|
-
* Indicates a Successful GetWebhookSecret request.
|
46
|
-
*/
|
47
|
-
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
48
|
-
}
|
49
|
-
exports.Success = Success;
|
50
|
-
class _Error extends Response {
|
51
|
-
constructor(_innerException) {
|
52
|
-
super();
|
53
|
-
this._innerException = _innerException;
|
26
|
+
toString() {
|
27
|
+
return super.toString() + ': ' + this._webhookName;
|
54
28
|
}
|
55
29
|
}
|
30
|
+
exports.Success = Success;
|
56
31
|
/**
|
57
32
|
* Indicates that an error occurred during the GetWebhookSecret request.
|
58
33
|
*
|
@@ -63,7 +38,11 @@ class _Error extends Response {
|
|
63
38
|
* - `message()` - a human-readable description of the error
|
64
39
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
65
40
|
*/
|
66
|
-
class Error extends
|
41
|
+
class Error extends response_base_1.BaseResponseError {
|
42
|
+
constructor(_innerException) {
|
43
|
+
super(_innerException);
|
44
|
+
this.type = enums_1.GetWebhookSecretResponse.Error;
|
45
|
+
}
|
67
46
|
}
|
68
47
|
exports.Error = Error;
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXdlYmhvb2stc2VjcmV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi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ocm93bi5cbiAqL1xuZXhwb3J0IGNsYXNzIEVycm9yIGV4dGVuZHMgQmFzZVJlc3BvbnNlRXJyb3IgaW1wbGVtZW50cyBJUmVzcG9uc2Uge1xuICByZWFkb25seSB0eXBlOiBHZXRXZWJob29rU2VjcmV0UmVzcG9uc2UuRXJyb3IgPVxuICAgIEdldFdlYmhvb2tTZWNyZXRSZXNwb25zZS5FcnJvcjtcbiAgY29uc3RydWN0b3IoX2lubmVyRXhjZXB0aW9uOiBTZGtFcnJvcikge1xuICAgIHN1cGVyKF9pbm5lckV4Y2VwdGlvbik7XG4gIH1cbn1cblxuZXhwb3J0IHR5cGUgUmVzcG9uc2UgPSBTdWNjZXNzIHwgRXJyb3I7XG4iXX0=
|
@@ -1,29 +1,16 @@
|
|
1
1
|
import { SdkError } from '../../../errors';
|
2
|
-
import {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from '../response-base';
|
3
3
|
import { Webhook } from '../../webhook';
|
4
|
+
import { ListWebhooksResponse } from '../enums';
|
5
|
+
interface IResponse {
|
6
|
+
readonly type: ListWebhooksResponse;
|
7
|
+
}
|
4
8
|
/**
|
5
|
-
*
|
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 ListWebhooks.Error) {
|
17
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
18
|
-
* // `ListWebhooks.Error` in this block, so you will have access to the properties
|
19
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
20
|
-
* }
|
21
|
-
* ```
|
9
|
+
* Indicates a Successful list webhooks request.
|
22
10
|
*/
|
23
|
-
export declare
|
24
|
-
}
|
25
|
-
declare class _Success extends Response {
|
11
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
26
12
|
private readonly webhooks;
|
13
|
+
readonly type = ListWebhooksResponse.Success;
|
27
14
|
constructor(webhooks: Webhook[]);
|
28
15
|
/**
|
29
16
|
* An array of webhooks.
|
@@ -32,29 +19,6 @@ declare class _Success extends Response {
|
|
32
19
|
getWebhooks(): Webhook[];
|
33
20
|
toString(): string;
|
34
21
|
}
|
35
|
-
declare const Success_base: {
|
36
|
-
new (...args: any[]): {
|
37
|
-
readonly is_success: boolean;
|
38
|
-
};
|
39
|
-
} & typeof _Success;
|
40
|
-
/**
|
41
|
-
* Indicates a Successful list webhooks request.
|
42
|
-
*/
|
43
|
-
export declare class Success extends Success_base {
|
44
|
-
}
|
45
|
-
declare class _Error extends Response {
|
46
|
-
protected _innerException: SdkError;
|
47
|
-
constructor(_innerException: SdkError);
|
48
|
-
}
|
49
|
-
declare const Error_base: {
|
50
|
-
new (...args: any[]): {
|
51
|
-
_innerException: SdkError;
|
52
|
-
message(): string;
|
53
|
-
innerException(): SdkError;
|
54
|
-
errorCode(): import("../../../errors").MomentoErrorCode;
|
55
|
-
toString(): string;
|
56
|
-
};
|
57
|
-
} & typeof _Error;
|
58
22
|
/**
|
59
23
|
* Indicates that an error occurred during the list webhooks request.
|
60
24
|
*
|
@@ -65,6 +29,9 @@ declare const Error_base: {
|
|
65
29
|
* - `message()` - a human-readable description of the error
|
66
30
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
67
31
|
*/
|
68
|
-
export declare class Error extends
|
32
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
33
|
+
readonly type: ListWebhooksResponse.Error;
|
34
|
+
constructor(_innerException: SdkError);
|
69
35
|
}
|
36
|
+
export type Response = Success | Error;
|
70
37
|
export {};
|
@@ -1,32 +1,15 @@
|
|
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 ListWebhooks.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `ListWebhooks.Error` in this block, so you will have access to the properties
|
20
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
21
|
-
* }
|
22
|
-
* ```
|
7
|
+
* Indicates a Successful list webhooks request.
|
23
8
|
*/
|
24
|
-
class
|
25
|
-
}
|
26
|
-
exports.Response = Response;
|
27
|
-
class _Success extends Response {
|
9
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
28
10
|
constructor(webhooks) {
|
29
11
|
super();
|
12
|
+
this.type = enums_1.ListWebhooksResponse.Success;
|
30
13
|
this.webhooks = webhooks;
|
31
14
|
}
|
32
15
|
/**
|
@@ -42,18 +25,7 @@ class _Success extends Response {
|
|
42
25
|
this.webhooks.map(webhook => webhook.id.webhookName).join(', '));
|
43
26
|
}
|
44
27
|
}
|
45
|
-
/**
|
46
|
-
* Indicates a Successful list webhooks request.
|
47
|
-
*/
|
48
|
-
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
49
|
-
}
|
50
28
|
exports.Success = Success;
|
51
|
-
class _Error extends Response {
|
52
|
-
constructor(_innerException) {
|
53
|
-
super();
|
54
|
-
this._innerException = _innerException;
|
55
|
-
}
|
56
|
-
}
|
57
29
|
/**
|
58
30
|
* Indicates that an error occurred during the list webhooks request.
|
59
31
|
*
|
@@ -64,7 +36,11 @@ class _Error extends Response {
|
|
64
36
|
* - `message()` - a human-readable description of the error
|
65
37
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
66
38
|
*/
|
67
|
-
class Error extends
|
39
|
+
class Error extends response_base_1.BaseResponseError {
|
40
|
+
constructor(_innerException) {
|
41
|
+
super(_innerException);
|
42
|
+
this.type = enums_1.ListWebhooksResponse.Error;
|
43
|
+
}
|
68
44
|
}
|
69
45
|
exports.Error = Error;
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC13ZWJob29rcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tZXNzYWdlcy9yZXNwb25zZXMvd2ViaG9vay9saXN0LXdlYmhvb2tzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG9EQUF3RTtBQUV4RSxvQ0FBOEM7QUFNOUM7O0dBRUc7QUFDSCxNQUFhLE9BQVEsU0FBUSxtQ0FBbUI7SUFJOUMsWUFBWSxRQUFtQjtRQUM3QixLQUFLLEVBQUUsQ0FBQztRQUhELFNBQUksR0FBRyw0QkFBb0IsQ0FBQyxPQUFPLENBQUM7UUFJM0MsSUFBSSxDQUFDLFFBQVEsR0FBRyxRQUFRLENBQUM7SUFDM0IsQ0FBQztJQUVEOzs7T0FHRztJQUNJLFdBQVc7UUFDaEIsT0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDO0lBQ3ZCLENBQUM7SUFFZSxRQUFRO1FBQ3RCLE9BQU8sQ0FDTCxLQUFLLENBQUMsUUFBUSxFQUFFO1lBQ2hCLElBQUk7WUFDSixJQUFJLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsV0FBVyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUNoRSxDQUFDO0lBQ0osQ0FBQztDQUNGO0FBeEJELDBCQXdCQztBQUVEOzs7Ozs7Ozs7R0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lLkVycm9yID0gTGlzdFdlYmhvb2tzUmVzcG9uc2UuRXJyb3I7XG4gIGNvbnN0cnVjdG9yKF9pbm5lckV4Y2VwdGlvbjogU2RrRXJyb3IpIHtcbiAgICBzdXBlcihfaW5uZXJFeGNlcHRpb24pO1xuICB9XG59XG5cbmV4cG9ydCB0eXBlIFJlc3BvbnNlID0gU3VjY2VzcyB8IEVycm9yO1xuIl19
|
@@ -1,54 +1,18 @@
|
|
1
1
|
import { SdkError } from '../../../errors';
|
2
|
-
import {
|
2
|
+
import { BaseResponseError, BaseResponseSuccess } from '../response-base';
|
3
|
+
import { PutWebhookResponse } from '../enums';
|
4
|
+
interface IResponse {
|
5
|
+
readonly type: PutWebhookResponse;
|
6
|
+
}
|
3
7
|
/**
|
4
|
-
*
|
5
|
-
* response object is resolved to a type-safe object of one of
|
6
|
-
* the following subtypes:
|
7
|
-
*
|
8
|
-
* - {Success}
|
9
|
-
* - {Error}
|
10
|
-
*
|
11
|
-
* `instanceof` type guards can be used to operate on the appropriate subtype.
|
12
|
-
* @example
|
13
|
-
* For example:
|
14
|
-
* ```
|
15
|
-
* if (response instanceof PutWebhook.Error) {
|
16
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
17
|
-
* // `PutWebhook.Error` in this block, so you will have access to the properties
|
18
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
19
|
-
* }
|
20
|
-
* ```
|
8
|
+
* Indicates a Successful PutWebhook request.
|
21
9
|
*/
|
22
|
-
export declare
|
23
|
-
|
24
|
-
declare class _Success extends Response {
|
10
|
+
export declare class Success extends BaseResponseSuccess implements IResponse {
|
11
|
+
readonly type = PutWebhookResponse.Success;
|
25
12
|
private readonly _secretString;
|
26
13
|
constructor(secretString: string);
|
27
14
|
secretString(): string;
|
28
15
|
}
|
29
|
-
declare const Success_base: {
|
30
|
-
new (...args: any[]): {
|
31
|
-
readonly is_success: boolean;
|
32
|
-
};
|
33
|
-
} & typeof _Success;
|
34
|
-
/**
|
35
|
-
* Indicates a Successful PutWebhook request.
|
36
|
-
*/
|
37
|
-
export declare class Success extends Success_base {
|
38
|
-
}
|
39
|
-
declare class _Error extends Response {
|
40
|
-
protected _innerException: SdkError;
|
41
|
-
constructor(_innerException: SdkError);
|
42
|
-
}
|
43
|
-
declare const Error_base: {
|
44
|
-
new (...args: any[]): {
|
45
|
-
_innerException: SdkError;
|
46
|
-
message(): string;
|
47
|
-
innerException(): SdkError;
|
48
|
-
errorCode(): import("../../../errors").MomentoErrorCode;
|
49
|
-
toString(): string;
|
50
|
-
};
|
51
|
-
} & typeof _Error;
|
52
16
|
/**
|
53
17
|
* Indicates that an error occurred during the PutWebhook request.
|
54
18
|
*
|
@@ -59,6 +23,9 @@ declare const Error_base: {
|
|
59
23
|
* - `message()` - a human-readable description of the error
|
60
24
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
61
25
|
*/
|
62
|
-
export declare class Error extends
|
26
|
+
export declare class Error extends BaseResponseError implements IResponse {
|
27
|
+
readonly type: PutWebhookResponse.Error;
|
28
|
+
constructor(_innerException: SdkError);
|
63
29
|
}
|
30
|
+
export type Response = Success | Error;
|
64
31
|
export {};
|
@@ -1,50 +1,22 @@
|
|
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 PutWebhook.Error) {
|
18
|
-
* // Handle error as appropriate. The compiler will smart-cast `response` to type
|
19
|
-
* // `PutWebhook.Error` in this block, so you will have access to the properties
|
20
|
-
* // of the Error class; e.g. `response.errorCode()`.
|
21
|
-
* }
|
22
|
-
* ```
|
7
|
+
* Indicates a Successful PutWebhook request.
|
23
8
|
*/
|
24
|
-
class
|
25
|
-
}
|
26
|
-
exports.Response = Response;
|
27
|
-
class _Success extends Response {
|
9
|
+
class Success extends response_base_1.BaseResponseSuccess {
|
28
10
|
constructor(secretString) {
|
29
11
|
super();
|
12
|
+
this.type = enums_1.PutWebhookResponse.Success;
|
30
13
|
this._secretString = secretString;
|
31
14
|
}
|
32
15
|
secretString() {
|
33
16
|
return this._secretString;
|
34
17
|
}
|
35
18
|
}
|
36
|
-
/**
|
37
|
-
* Indicates a Successful PutWebhook request.
|
38
|
-
*/
|
39
|
-
class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
|
40
|
-
}
|
41
19
|
exports.Success = Success;
|
42
|
-
class _Error extends Response {
|
43
|
-
constructor(_innerException) {
|
44
|
-
super();
|
45
|
-
this._innerException = _innerException;
|
46
|
-
}
|
47
|
-
}
|
48
20
|
/**
|
49
21
|
* Indicates that an error occurred during the PutWebhook request.
|
50
22
|
*
|
@@ -55,7 +27,11 @@ class _Error extends Response {
|
|
55
27
|
* - `message()` - a human-readable description of the error
|
56
28
|
* - `innerException()` - the original error that caused the failure; can be re-thrown.
|
57
29
|
*/
|
58
|
-
class Error extends
|
30
|
+
class Error extends response_base_1.BaseResponseError {
|
31
|
+
constructor(_innerException) {
|
32
|
+
super(_innerException);
|
33
|
+
this.type = enums_1.PutWebhookResponse.Error;
|
34
|
+
}
|
59
35
|
}
|
60
36
|
exports.Error = Error;
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHV0LXdlYmhvb2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWVzc2FnZXMvcmVzcG9uc2VzL3dlYmhv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