@ingestkorea/client-sens 1.9.0 → 1.10.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/README.md +1 -0
- package/dist-cjs/SensClient.js +21 -18
- package/dist-cjs/commands/ListAlimtalkStatusCommand.js +5 -7
- package/dist-cjs/commands/ListSMSStatusCommand.js +5 -7
- package/dist-cjs/commands/SendAlimtalkCommand.js +6 -13
- package/dist-cjs/commands/SendMMSCommand.js +9 -19
- package/dist-cjs/commands/SendSMSCommand.js +5 -7
- package/dist-cjs/commands/constants.js +7 -18
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/middleware/middleware-metadata.js +1 -1
- package/dist-cjs/middleware/middleware-retry.js +19 -26
- package/dist-cjs/models/SensError.js +14 -0
- package/dist-cjs/models/SensErrorInfo.js +29 -11
- package/dist-cjs/models/index.js +1 -0
- package/dist-cjs/protocols/constants.js +74 -48
- package/dist-es/SensClient.js +21 -18
- package/dist-es/commands/ListAlimtalkStatusCommand.js +5 -7
- package/dist-es/commands/ListSMSStatusCommand.js +5 -7
- package/dist-es/commands/SendAlimtalkCommand.js +6 -13
- package/dist-es/commands/SendMMSCommand.js +9 -19
- package/dist-es/commands/SendSMSCommand.js +5 -7
- package/dist-es/commands/constants.js +7 -18
- package/dist-es/index.js +1 -0
- package/dist-es/middleware/middleware-metadata.js +1 -1
- package/dist-es/middleware/middleware-retry.js +21 -32
- package/dist-es/models/SensError.js +14 -0
- package/dist-es/models/SensErrorInfo.js +29 -11
- package/dist-es/models/index.js +1 -0
- package/dist-es/protocols/constants.js +77 -51
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/SensClient.d.ts +0 -1
- package/dist-types/models/SensError.d.ts +17 -0
- package/dist-types/models/SensErrorInfo.d.ts +51 -15
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/protocols/constants.d.ts +1 -1
- package/package.json +2 -3
|
@@ -1,21 +1,57 @@
|
|
|
1
|
+
export declare const SENS_ERROR_CODE_SPEC: {
|
|
2
|
+
readonly 400: "Bad Request";
|
|
3
|
+
readonly 401: "Unauthorized";
|
|
4
|
+
readonly 403: "Forbidden";
|
|
5
|
+
readonly 404: "Not Found";
|
|
6
|
+
readonly 429: "Too Many Requests";
|
|
7
|
+
readonly 500: "Internal Server Error";
|
|
8
|
+
};
|
|
9
|
+
export declare const NCLOUD_ERROR_CODE_SPEC: {
|
|
10
|
+
readonly "100": {
|
|
11
|
+
readonly status: 400;
|
|
12
|
+
readonly type: "Bad Request";
|
|
13
|
+
};
|
|
14
|
+
readonly "200": {
|
|
15
|
+
readonly status: 401;
|
|
16
|
+
readonly type: "Unauthorized";
|
|
17
|
+
};
|
|
18
|
+
readonly "210": {
|
|
19
|
+
readonly status: 403;
|
|
20
|
+
readonly type: "Forbidden";
|
|
21
|
+
};
|
|
22
|
+
readonly "300": {
|
|
23
|
+
readonly status: 404;
|
|
24
|
+
readonly type: "Not Found";
|
|
25
|
+
};
|
|
26
|
+
readonly "400": {
|
|
27
|
+
readonly status: 429;
|
|
28
|
+
readonly type: "Too Many Requests";
|
|
29
|
+
};
|
|
30
|
+
readonly "410": {
|
|
31
|
+
readonly status: 429;
|
|
32
|
+
readonly type: "Too Many Requests";
|
|
33
|
+
};
|
|
34
|
+
readonly "420": {
|
|
35
|
+
readonly status: 429;
|
|
36
|
+
readonly type: "Too Many Requests";
|
|
37
|
+
};
|
|
38
|
+
readonly "900": {
|
|
39
|
+
readonly status: 500;
|
|
40
|
+
readonly type: "Internal Server Error";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type SesnResponseErrorType = (typeof SENS_ERROR_CODE_SPEC)[keyof typeof SENS_ERROR_CODE_SPEC];
|
|
1
44
|
export interface SensErrorResponse {
|
|
2
45
|
status: number;
|
|
3
46
|
errorMessage?: string;
|
|
4
47
|
errors?: object;
|
|
5
48
|
}
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export type InvalidInputs = {
|
|
13
|
-
type: string;
|
|
14
|
-
message: string;
|
|
15
|
-
};
|
|
16
|
-
export declare class SensError extends Error {
|
|
17
|
-
readonly code: number;
|
|
18
|
-
readonly type: string;
|
|
19
|
-
readonly invalidInputs: InvalidInputs[];
|
|
20
|
-
constructor(info: SensErrorInput);
|
|
49
|
+
export interface NCloudErrorResponse {
|
|
50
|
+
error: {
|
|
51
|
+
errorCode: string;
|
|
52
|
+
message?: string;
|
|
53
|
+
details?: string;
|
|
54
|
+
};
|
|
21
55
|
}
|
|
56
|
+
export declare const SENS_ERROR_BODY_SPEC: [[keyof SensErrorResponse][number], string, boolean][];
|
|
57
|
+
export declare const NCLOUD_ERROR_BODY_SPEC: [[keyof NCloudErrorResponse["error"]][number], string, boolean][];
|
|
@@ -2,6 +2,6 @@ import { HttpResponse } from "@ingestkorea/util-http-handler";
|
|
|
2
2
|
import { ResponseMetadata } from "../models/index.js";
|
|
3
3
|
export declare const deserializeMetadata: (response: HttpResponse) => ResponseMetadata;
|
|
4
4
|
export declare const parseBody: (output: HttpResponse) => Promise<any>;
|
|
5
|
-
export declare const parseErrorBody: (output: HttpResponse) => Promise<
|
|
5
|
+
export declare const parseErrorBody: (output: HttpResponse) => Promise<never>;
|
|
6
6
|
export declare const compact: <T>(obj: T) => T;
|
|
7
7
|
export declare const convertToUtc: (input: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ingestkorea/client-sens",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -43,8 +43,7 @@
|
|
|
43
43
|
"typescript": "^5"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@ingestkorea/util-
|
|
47
|
-
"@ingestkorea/util-http-handler": "^1.1.2"
|
|
46
|
+
"@ingestkorea/util-http-handler": "^1.3.0"
|
|
48
47
|
},
|
|
49
48
|
"keywords": [
|
|
50
49
|
"sens",
|