@ingestkorea/client-sens 1.8.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/GetAlimtalkStatusCommand.js +1 -3
- package/dist-cjs/commands/GetSMSStatusCommand.js +2 -3
- package/dist-cjs/commands/ListAlimtalkStatusCommand.js +19 -11
- package/dist-cjs/commands/ListSMSStatusCommand.js +35 -0
- package/dist-cjs/commands/SendAlimtalkCommand.js +7 -14
- package/dist-cjs/commands/SendMMSCommand.js +9 -19
- package/dist-cjs/commands/SendSMSCommand.js +5 -7
- package/dist-cjs/commands/constants.js +47 -1
- package/dist-cjs/commands/index.js +1 -0
- 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/ListSMSStatus.js +2 -0
- package/dist-cjs/models/SensError.js +14 -0
- package/dist-cjs/models/SensErrorInfo.js +29 -11
- package/dist-cjs/models/index.js +2 -0
- package/dist-cjs/protocols/GetAlimtalkStatus.js +5 -5
- package/dist-cjs/protocols/GetAlimtalkTemplate.js +1 -1
- package/dist-cjs/protocols/GetSMSResult.js +3 -2
- package/dist-cjs/protocols/GetSMSStatus.js +28 -11
- package/dist-cjs/protocols/ListAlimtalkChannels.js +2 -2
- package/dist-cjs/protocols/ListAlimtalkTemplates.js +2 -2
- package/dist-cjs/protocols/ListSMSStatus.js +48 -0
- package/dist-cjs/protocols/SendAlimtalk.js +1 -1
- package/dist-cjs/protocols/SendSMS.js +1 -1
- package/dist-cjs/protocols/constants.js +80 -49
- package/dist-es/SensClient.js +21 -18
- package/dist-es/commands/GetAlimtalkStatusCommand.js +1 -3
- package/dist-es/commands/GetSMSStatusCommand.js +3 -0
- package/dist-es/commands/ListAlimtalkStatusCommand.js +22 -14
- package/dist-es/commands/ListSMSStatusCommand.js +46 -0
- package/dist-es/commands/SendAlimtalkCommand.js +7 -13
- package/dist-es/commands/SendMMSCommand.js +9 -19
- package/dist-es/commands/SendSMSCommand.js +5 -7
- package/dist-es/commands/constants.js +47 -1
- package/dist-es/commands/index.js +1 -0
- 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/ListSMSStatus.js +2 -0
- package/dist-es/models/SensError.js +14 -0
- package/dist-es/models/SensErrorInfo.js +29 -11
- package/dist-es/models/index.js +2 -0
- package/dist-es/protocols/GetAlimtalkStatus.js +12 -12
- package/dist-es/protocols/GetAlimtalkTemplate.js +1 -1
- package/dist-es/protocols/GetSMSResult.js +5 -9
- package/dist-es/protocols/GetSMSStatus.js +28 -11
- package/dist-es/protocols/ListAlimtalkChannels.js +2 -2
- package/dist-es/protocols/ListAlimtalkTemplates.js +2 -2
- package/dist-es/protocols/ListSMSStatus.js +42 -0
- package/dist-es/protocols/SendAlimtalk.js +1 -1
- package/dist-es/protocols/SendSMS.js +1 -1
- package/dist-es/protocols/constants.js +83 -52
- package/dist-types/commands/ListSMSStatusCommand.d.ts +11 -0
- package/dist-types/commands/constants.d.ts +17 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/GetSMSResult.d.ts +2 -6
- package/dist-types/models/GetSMSStatus.d.ts +15 -0
- package/dist-types/models/ListSMSStatus.d.ts +15 -0
- package/dist-types/models/SendAlimtalk.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 +2 -0
- package/dist-types/protocols/GetSMSStatus.d.ts +2 -1
- package/dist-types/protocols/ListSMSStatus.d.ts +4 -0
- package/dist-types/protocols/constants.d.ts +2 -1
- package/package.json +2 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compact = exports.parseErrorBody = exports.parseBody = exports.deserializeMetadata = void 0;
|
|
3
|
+
exports.convertToUtc = exports.compact = exports.parseErrorBody = exports.parseBody = exports.deserializeMetadata = void 0;
|
|
4
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
5
5
|
const index_js_1 = require("../models/index.js");
|
|
6
6
|
const constants_js_1 = require("../middleware/constants.js");
|
|
@@ -19,80 +19,84 @@ const parseBody = async (output) => {
|
|
|
19
19
|
if (!isJsonResponse(headers["content-type"])) {
|
|
20
20
|
await (0, util_http_handler_1.destroyStream)(streamBody);
|
|
21
21
|
throw new index_js_1.SensError({
|
|
22
|
-
code:
|
|
23
|
-
type: "
|
|
22
|
+
code: -1,
|
|
23
|
+
type: "SDK.REQUEST_ERROR",
|
|
24
24
|
message: "response content-type is not application/json",
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
message: "parse response body error",
|
|
38
|
-
});
|
|
39
|
-
}
|
|
27
|
+
try {
|
|
28
|
+
const data = await (0, util_http_handler_1.collectBodyString)(streamBody);
|
|
29
|
+
return data.length ? JSON.parse(data) : {};
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
throw new index_js_1.SensError({
|
|
33
|
+
code: -1,
|
|
34
|
+
type: "SDK.REQUEST_ERROR",
|
|
35
|
+
message: e instanceof Error ? e.message : "parse response body error",
|
|
36
|
+
});
|
|
40
37
|
}
|
|
41
|
-
return {};
|
|
42
38
|
};
|
|
43
39
|
exports.parseBody = parseBody;
|
|
44
40
|
const parseErrorBody = async (output) => {
|
|
45
41
|
const { statusCode, headers, body: streamBody } = output;
|
|
46
|
-
const error = new index_js_1.SensError({
|
|
47
|
-
code: statusCode !== null && statusCode !== void 0 ? statusCode : 400,
|
|
48
|
-
type: "Bad Request",
|
|
49
|
-
message: "something wrong",
|
|
50
|
-
});
|
|
51
42
|
if (!isJsonResponse(headers["content-type"])) {
|
|
52
43
|
await (0, util_http_handler_1.destroyStream)(streamBody);
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
throw new index_js_1.SensError({
|
|
45
|
+
code: -1,
|
|
46
|
+
type: "SDK.REQUEST_ERROR",
|
|
47
|
+
message: "response content-type is not application/json",
|
|
48
|
+
});
|
|
55
49
|
}
|
|
56
50
|
const data = await (0, util_http_handler_1.collectBodyString)(streamBody);
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
|
|
51
|
+
const sensErrorBody = isSensErrorResponse(data);
|
|
52
|
+
const nCloudErrorBody = isNCloudErrorResponse(data);
|
|
53
|
+
if (sensErrorBody) {
|
|
54
|
+
const errorType = isSensErrorCode(sensErrorBody.status)
|
|
55
|
+
? index_js_1.SENS_ERROR_CODE_SPEC[sensErrorBody.status]
|
|
56
|
+
: "SDK.UNKNOWN_ERROR";
|
|
57
|
+
throw new index_js_1.SensError({
|
|
58
|
+
code: isSensErrorCode(sensErrorBody.status) ? sensErrorBody.status : statusCode,
|
|
59
|
+
type: errorType,
|
|
60
|
+
message: sensErrorBody.errorMessage || errorType,
|
|
61
|
+
...(sensErrorBody.errors &&
|
|
62
|
+
Array.isArray(sensErrorBody.errors) && {
|
|
63
|
+
errors: sensErrorBody.errors.filter((d) => !!d),
|
|
64
|
+
}),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (nCloudErrorBody) {
|
|
68
|
+
const { errorCode } = nCloudErrorBody.error;
|
|
69
|
+
const errorType = isNCloudErrorCode(errorCode)
|
|
70
|
+
? index_js_1.NCLOUD_ERROR_CODE_SPEC[errorCode].type
|
|
71
|
+
: "SDK.UNKNOWN_ERROR";
|
|
72
|
+
throw new index_js_1.SensError({
|
|
73
|
+
code: isNCloudErrorCode(errorCode) ? index_js_1.NCLOUD_ERROR_CODE_SPEC[errorCode].status : statusCode,
|
|
74
|
+
type: errorType,
|
|
75
|
+
message: nCloudErrorBody.error.details || "Something wrong",
|
|
76
|
+
});
|
|
61
77
|
}
|
|
62
78
|
throw new index_js_1.SensError({
|
|
63
|
-
code:
|
|
64
|
-
type:
|
|
65
|
-
message:
|
|
66
|
-
|
|
67
|
-
Array.isArray(sensErrorBody.errors) && {
|
|
68
|
-
invalidInputs: sensErrorBody.errors.map((msg) => {
|
|
69
|
-
return { type: "not-valid.args", message: msg };
|
|
70
|
-
}),
|
|
71
|
-
}),
|
|
79
|
+
code: -1,
|
|
80
|
+
type: "SDK.UNKNOWN_ERROR",
|
|
81
|
+
message: "Invalid Naver Cloud Platform response format",
|
|
82
|
+
errors: [`${statusCode} - ${data.slice(0, 120)}...`],
|
|
72
83
|
});
|
|
73
84
|
};
|
|
74
85
|
exports.parseErrorBody = parseErrorBody;
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
401: "Unauthorized",
|
|
78
|
-
403: "Forbidden",
|
|
79
|
-
404: "Not Found",
|
|
80
|
-
429: "Too Many Requests",
|
|
81
|
-
500: "Internal Server Error",
|
|
86
|
+
const isSensErrorCode = (code) => {
|
|
87
|
+
return code in index_js_1.SENS_ERROR_CODE_SPEC;
|
|
82
88
|
};
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
];
|
|
88
|
-
const isSensErrorBody = (input) => {
|
|
89
|
+
const isNCloudErrorCode = (code) => {
|
|
90
|
+
return code in index_js_1.NCLOUD_ERROR_CODE_SPEC;
|
|
91
|
+
};
|
|
92
|
+
const isSensErrorResponse = (input) => {
|
|
89
93
|
if (typeof input !== "string")
|
|
90
94
|
return null;
|
|
91
95
|
try {
|
|
92
96
|
const data = JSON.parse(input);
|
|
93
97
|
if (!data || typeof data !== "object")
|
|
94
98
|
return null;
|
|
95
|
-
const isValid = SENS_ERROR_BODY_SPEC.every(([key, type, required]) => {
|
|
99
|
+
const isValid = index_js_1.SENS_ERROR_BODY_SPEC.every(([key, type, required]) => {
|
|
96
100
|
const value = data[key];
|
|
97
101
|
if (required && (value === undefined || value === null))
|
|
98
102
|
return false;
|
|
@@ -106,6 +110,27 @@ const isSensErrorBody = (input) => {
|
|
|
106
110
|
return null;
|
|
107
111
|
}
|
|
108
112
|
};
|
|
113
|
+
const isNCloudErrorResponse = (input) => {
|
|
114
|
+
if (typeof input !== "string")
|
|
115
|
+
return null;
|
|
116
|
+
try {
|
|
117
|
+
const data = JSON.parse(input);
|
|
118
|
+
if (!(data && typeof data == "object" && typeof data.error == "object"))
|
|
119
|
+
return null;
|
|
120
|
+
const isValid = index_js_1.NCLOUD_ERROR_BODY_SPEC.every(([key, type, required]) => {
|
|
121
|
+
const value = data.error[key];
|
|
122
|
+
if (required && (value === undefined || value === null))
|
|
123
|
+
return false;
|
|
124
|
+
if (value !== undefined && typeof value !== type)
|
|
125
|
+
return false;
|
|
126
|
+
return true;
|
|
127
|
+
});
|
|
128
|
+
return isValid ? data : null;
|
|
129
|
+
}
|
|
130
|
+
catch (_a) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
109
134
|
const compact = (obj) => {
|
|
110
135
|
if (Array.isArray(obj)) {
|
|
111
136
|
return obj.map((item) => (0, exports.compact)(item));
|
|
@@ -119,6 +144,12 @@ const compact = (obj) => {
|
|
|
119
144
|
return obj;
|
|
120
145
|
};
|
|
121
146
|
exports.compact = compact;
|
|
147
|
+
const convertToUtc = (input) => {
|
|
148
|
+
const utcRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
|
|
149
|
+
return utcRegex.test(input) ? input : new Date(input.replace(" ", "T") + "+09:00").toISOString();
|
|
150
|
+
};
|
|
151
|
+
exports.convertToUtc = convertToUtc;
|
|
122
152
|
const isJsonResponse = (contentType) => {
|
|
123
|
-
|
|
153
|
+
var _a;
|
|
154
|
+
return (_a = contentType === null || contentType === void 0 ? void 0 : contentType.toLowerCase().includes("application/json")) !== null && _a !== void 0 ? _a : false;
|
|
124
155
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SensClientResolvedConfig, SensCommand, ListSMSStatusRequest, ListSMSStatusResult, MetadataBearer, RequestSerializer, ResponseDeserializer } from "../models/index.js";
|
|
2
|
+
export interface ListSMSStatusCommandInput extends ListSMSStatusRequest {
|
|
3
|
+
}
|
|
4
|
+
export interface ListSMSStatusCommandOutput extends MetadataBearer, ListSMSStatusResult {
|
|
5
|
+
}
|
|
6
|
+
export declare class ListSMSStatusCommand extends SensCommand<ListSMSStatusCommandInput, ListSMSStatusCommandOutput, SensClientResolvedConfig> {
|
|
7
|
+
input: ListSMSStatusCommandInput;
|
|
8
|
+
serializer: RequestSerializer<ListSMSStatusCommandInput, SensClientResolvedConfig>;
|
|
9
|
+
deserializer: ResponseDeserializer<ListSMSStatusCommandOutput, SensClientResolvedConfig>;
|
|
10
|
+
constructor(input: ListSMSStatusCommandInput);
|
|
11
|
+
}
|
|
@@ -2,3 +2,20 @@ export declare const trimText: (input: string) => string;
|
|
|
2
2
|
export declare const prettyPhoneNum: (input: string) => string;
|
|
3
3
|
/** @returns content-length(euc-kr) */
|
|
4
4
|
export declare const getContentLength: (input: string) => number;
|
|
5
|
+
export declare const convertToUtc: (input: string) => string;
|
|
6
|
+
export declare const convertToKst: (input: number) => string;
|
|
7
|
+
export declare const getDefaultRequestDuration: (config: {
|
|
8
|
+
durationLimitMs: number;
|
|
9
|
+
}) => {
|
|
10
|
+
startTime: string;
|
|
11
|
+
endTime: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const resolveRequestDuration: (input: {
|
|
14
|
+
startTime: string;
|
|
15
|
+
endTime: string;
|
|
16
|
+
}, config: {
|
|
17
|
+
durationLimitMs: number;
|
|
18
|
+
}) => {
|
|
19
|
+
startTimeMs: number;
|
|
20
|
+
endTimeMs: number;
|
|
21
|
+
};
|
|
@@ -6,6 +6,7 @@ export * from "./GetSMSStatusCommand.js";
|
|
|
6
6
|
export * from "./ListAlimtalkChannelsCommand.js";
|
|
7
7
|
export * from "./ListAlimtalkStatusCommand.js";
|
|
8
8
|
export * from "./ListAlimtalkTemplatesCommand.js";
|
|
9
|
+
export * from "./ListSMSStatusCommand.js";
|
|
9
10
|
export * from "./SendAlimtalkCommand.js";
|
|
10
11
|
export * from "./SendMMSCommand.js";
|
|
11
12
|
export * from "./SendSMSCommand.js";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -8,15 +8,11 @@ export interface GetSMSResultResult {
|
|
|
8
8
|
messages?: SMSMessageStatus[];
|
|
9
9
|
}
|
|
10
10
|
export interface SMSMessageStatus extends SMSMessageRequestStatus {
|
|
11
|
+
subject?: string;
|
|
11
12
|
content?: string;
|
|
12
|
-
status?: string;
|
|
13
|
-
statusCode?: string;
|
|
14
|
-
statusMessage?: string;
|
|
15
|
-
statusName?: string;
|
|
16
|
-
completeTime?: string;
|
|
17
|
-
telcoCode?: string;
|
|
18
13
|
files?: File[];
|
|
19
14
|
}
|
|
20
15
|
export interface File {
|
|
16
|
+
fileId?: string;
|
|
21
17
|
name?: string;
|
|
22
18
|
}
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
export interface GetSMSStatusRequest {
|
|
2
2
|
requestId: string;
|
|
3
|
+
pageSize?: number;
|
|
4
|
+
nextToken?: string;
|
|
3
5
|
}
|
|
4
6
|
export interface GetSMSStatusResult {
|
|
5
7
|
requestId?: string;
|
|
6
8
|
statusCode?: string;
|
|
7
9
|
statusName?: string;
|
|
8
10
|
messages?: SMSMessageRequestStatus[];
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
pageIndex?: number;
|
|
13
|
+
itemCount?: number;
|
|
14
|
+
hasMore?: boolean;
|
|
15
|
+
nextToken?: string;
|
|
9
16
|
}
|
|
10
17
|
export interface SMSMessageRequestStatus {
|
|
18
|
+
requestId?: string;
|
|
11
19
|
messageId?: string;
|
|
12
20
|
requestTime?: string;
|
|
13
21
|
contentType?: string;
|
|
22
|
+
type?: string;
|
|
14
23
|
countryCode?: string;
|
|
15
24
|
from?: string;
|
|
16
25
|
to?: string;
|
|
26
|
+
completeTime?: string;
|
|
27
|
+
telcoCode?: string;
|
|
28
|
+
status?: string;
|
|
29
|
+
statusCode?: string;
|
|
30
|
+
statusName?: string;
|
|
31
|
+
statusMessage?: string;
|
|
17
32
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GetSMSStatusResult } from "./GetSMSStatus.js";
|
|
2
|
+
export interface ListSMSStatusRequest {
|
|
3
|
+
requestStartTime?: string;
|
|
4
|
+
requestEndTime?: string;
|
|
5
|
+
type?: "SMS" | "LMS" | "MMS";
|
|
6
|
+
contentType?: "COMM" | "AD";
|
|
7
|
+
status?: "READY" | "PROCESSING" | "COMPLETED";
|
|
8
|
+
from?: string;
|
|
9
|
+
to?: string;
|
|
10
|
+
statusName?: "success" | "fail";
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
nextToken?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ListSMSStatusResult extends GetSMSStatusResult {
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SesnResponseErrorType } from "./SensErrorInfo.js";
|
|
2
|
+
type SensClientErrorType = "SDK.AUTH_ERROR" | "SDK.GENERAL_ERROR" | "SDK.REQUEST_ERROR" | "SDK.UNKNOWN_ERROR";
|
|
3
|
+
export type SensErrorType = SesnResponseErrorType | SensClientErrorType;
|
|
4
|
+
export interface SensErrorInput {
|
|
5
|
+
code: number;
|
|
6
|
+
type: SensErrorType;
|
|
7
|
+
message: string;
|
|
8
|
+
errors?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare class SensError extends Error {
|
|
11
|
+
readonly code: number;
|
|
12
|
+
readonly type: SensErrorType;
|
|
13
|
+
readonly errors: string[];
|
|
14
|
+
readonly timestamp: string;
|
|
15
|
+
constructor(info: SensErrorInput);
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -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][];
|
|
@@ -6,11 +6,13 @@ export * from "./GetSMSStatus.js";
|
|
|
6
6
|
export * from "./ListAlimtalkChannels.js";
|
|
7
7
|
export * from "./ListAlimtalkStatus.js";
|
|
8
8
|
export * from "./ListAlimtalkTemplates.js";
|
|
9
|
+
export * from "./ListSMSStatus.js";
|
|
9
10
|
export * from "./MetadataBearer.js";
|
|
10
11
|
export * from "./SendAlimtalk.js";
|
|
11
12
|
export * from "./SendMMS.js";
|
|
12
13
|
export * from "./SendSMS.js";
|
|
13
14
|
export * from "./SensClient.js";
|
|
14
15
|
export * from "./SensCommand.js";
|
|
16
|
+
export * from "./SensError.js";
|
|
15
17
|
export * from "./SensErrorInfo.js";
|
|
16
18
|
export * from "./SensMiddleware.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, SMSMessageRequestStatus } from "../models/index.js";
|
|
1
|
+
import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, GetSMSStatusResult, SMSMessageRequestStatus } from "../models/index.js";
|
|
2
2
|
import { GetSMSStatusCommandInput, GetSMSStatusCommandOutput } from "../commands/GetSMSStatusCommand.js";
|
|
3
3
|
export declare const se_GetSMSStatusCommand: RequestSerializer<GetSMSStatusCommandInput, SensClientResolvedConfig>;
|
|
4
4
|
export declare const de_GetSMSStatusCommand: ResponseDeserializer<GetSMSStatusCommandOutput, SensClientResolvedConfig>;
|
|
5
|
+
export declare const de_GetSMSStatusResult: (output: any) => GetSMSStatusResult;
|
|
5
6
|
export declare const de_SMSMessageRequestStatus: (output: any) => SMSMessageRequestStatus;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
|
|
2
|
+
import { ListSMSStatusCommandInput, ListSMSStatusCommandOutput } from "../commands/ListSMSStatusCommand.js";
|
|
3
|
+
export declare const se_ListSMSStatusCommand: RequestSerializer<ListSMSStatusCommandInput, SensClientResolvedConfig>;
|
|
4
|
+
export declare const de_ListSMSStatusCommand: ResponseDeserializer<ListSMSStatusCommandOutput, SensClientResolvedConfig>;
|
|
@@ -2,5 +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
|
+
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",
|